Hide views table columns when they do not contain any data
This commit is contained in:
parent
7f9f9dcd75
commit
6a0e27914f
|
@ -1061,7 +1061,7 @@ display:
|
|||
image_target_id:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
id:
|
||||
sortable: true
|
||||
|
@ -1087,22 +1087,22 @@ display:
|
|||
flag_value:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
parent_target_id:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
owner_target_id:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
location:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
status:
|
||||
sortable: true
|
||||
|
|
|
@ -1358,32 +1358,32 @@ display:
|
|||
asset_target_id:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
location_target_id:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
quantity_target_id:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
flag_value:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
category_target_id:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
owner_target_id:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
override: true
|
||||
sticky: false
|
||||
|
|
|
@ -303,6 +303,15 @@ function farm_ui_views_add_bundle_handlers(ViewExecutable $view, string $display
|
|||
if (!empty($sort_field)) {
|
||||
farm_ui_views_sort_field($view, $display_id, $new_field_id, $sort_field);
|
||||
}
|
||||
|
||||
// Add the field to the table style options.
|
||||
$view->getStyle()->options['columns'][$new_field_id] = $new_field_id;
|
||||
$view->getStyle()->options['info'][$new_field_id] = [
|
||||
'align' => '',
|
||||
'separator' => '',
|
||||
'empty_column' => TRUE,
|
||||
'responsive' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue