Make EntityQuery Block Table sortable I made a custom EntityQuery Block Plugin with a table output and managed to make the headers sortable using this $header definition:
        $header = [
            'title'      =&gt; [
                'data'      =&gt; t('title'),
                'field'     =&gt; 'title',
                'specifier' =&gt; 'title',
            ],
            'mydate'       =&gt; [
                'data'      =&gt; t('mydate'),
                'field'     =&gt; 'field_date_paragraph',
                'specifier' =&gt; 'field_date_paragraph',
            ]
        ];

Then I added a tablesort when retrieving the nodes:
    $nids = \Drupal::entityQuery('node')
        -&gt;condition('status', 1)
        -&gt;condition('type', 'project')
        -&gt;tableSort($header)
        -&gt;condition('field_exhibition.target_id', \Drupal::routeMatch()-&gt;getRawParameter('node'))
        -&gt;execute();

The output looks fine and column headers are clickable - but nothing happens. Actually the GET parameters get correctly added to the URL and look something like:
?sort=asc&amp;order=mydate

I think the problem is date field (field_date_paragraph) which is a paragraph field. Inside the paragraph I have a date field and it is this one which should get ordered. What do I have to add to $header definition to make reference to the date field inside field_date_paragraph?
I think you need to specify a filed name inside a paragraph in the header array, like field_date_paragraph.DATE_FIELD_NAME (This behavior is, also supported inside condition method)
And here is the issue about lack of documentation https://www.drupal.org/project/drupal/issues/1924622