In my efforts to test sticky table header performance in D8 in general I was unable to get D8 views to actually attach it via:
$variables['view']->element['#attached']['library'][] = 'core/drupal.tableheader';
in
core/modules/views/views.theme.inc
To reproduce create a view of Format table with stick table headers enabled as a settigns option. Have enough content to trigger stick headers on scroll and notice that it doesnt nclude or execute the needed JS. The proper classes are added.
Attempted to figure out why the above code wasnt enough to include the library as it seems to be a complete definition but im not sure about the $variables in this function and it might be the longest preprocess ive seen in my whole life ;).
Comments
Comment #1
nico.pinos CreditAttribution: nico.pinos commentedIs the other call below loading at all?
"core/drupal.tableresponsive" (line: 722)
I think it is having the same issue.
Comment #2
dawehner.
Comment #11
LendudeCleaning up old bugs.
I can't reproduce this anymore. Tested it using the clean Umami install with sticky headers enabled on the content admin View.
If this is still an issue and I'm missing some steps to reproduce this, please feel free to reopen this.