Forbid hiding of the columns with no label on datatables, as these are difficult to unhide again

This commit is contained in:
Jan Böhmer 2022-09-11 00:46:12 +02:00
parent 4b9a40664b
commit bee057bc4b
2 changed files with 2 additions and 0 deletions

View file

@ -79,6 +79,7 @@ final class AttachmentDataTable implements DataTableTypeInterface
{ {
$dataTable->add('picture', TextColumn::class, [ $dataTable->add('picture', TextColumn::class, [
'label' => '', 'label' => '',
'className' => 'no-colvis',
'render' => function ($value, Attachment $context) { 'render' => function ($value, Attachment $context) {
if ($context->isPicture() if ($context->isPicture()
&& !$context->isExternal() && !$context->isExternal()

View file

@ -121,6 +121,7 @@ class LogDataTable implements DataTableTypeInterface
$dataTable->add('symbol', TextColumn::class, [ $dataTable->add('symbol', TextColumn::class, [
'label' => '', 'label' => '',
'className' => 'no-colvis',
'render' => static function ($value, AbstractLogEntry $context) { 'render' => static function ($value, AbstractLogEntry $context) {
switch ($context->getLevelString()) { switch ($context->getLevelString()) {
case LogLevel::DEBUG: case LogLevel::DEBUG: