Cannot remove media when editing Layout Builder form

Created on 28 May 2024, 29 days 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.69.0 2024