To fully translate a view into one language I have to expand dozens of collapsed panels, most of them with only one or two subelements.
I've reported it here. But is there a quick workaround, like a module or setting that automatically expands all these panels?
I tried using hook_form_FORM_ID_alter
but changing the #open
value is ignored (note that it's a top-level Displays panel #open
which is true
by default):
/**
* Implements hook_form_FORM_ID_alter().
*/
function custom_admin_form_config_translation_edit_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
foreach ($form['config_names'] as $key => $config_name) {
if (substr( $key, 0, 1 ) !== '#') {
$display = $config_name['display'];
$display['#open'] = false;
}
}
}