Cannot remove media when editing Layout Builder form

Created on 28 May 2024, 7 months ago

I'm using it with Layout Builder but I cannot remove media I can only change it.

It seems that function valueCallback not working anymore because $form_state->getTriggeringElement() is empty.

// Remove the default value propery in case of AJAX removal.
if ($form_state->isSubmitted() && end($form_state->getTriggeringElement()['#parents']) === 'remove_button') {
  $element['#default_value'] = NULL;
}
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇿Czech Republic parisek

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024