Skip to content
Snippets Groups Projects

Issue #3444722: Unset the Claro "tablePositionSticky" pre-render for the table element

Open Issue #3444722: Unset the Claro "tablePositionSticky" pre-render for the table element
1 file
+ 13
0
Compare changes
  • Side-by-side
  • Inline
+ 13
0
@@ -5,6 +5,7 @@
* form.theme
*/
use Drupal\claro\ClaroPreRender;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
use Drupal\gin\GinContentFormHelper;
@@ -191,6 +192,18 @@ function gin_element_info_alter(&$info) {
'textFormat',
];
}
// Unset the Claro "tablePositionSticky" pre-render for the table element
// since we have our own implementation for sticky tables which is not
// compatible.
if (isset($info['table'])) {
foreach ([ClaroPreRender::class, 'ClaroPreRender'] as $class) {
$index = array_search([$class, 'tablePositionSticky'], $info['table']['#pre_render'], TRUE);
if ($index !== FALSE) {
unset($info['table']['#pre_render'][$index]);
}
}
}
}
/**
Loading