Skip to content
Snippets Groups Projects
Commit fe1637f1 authored by Seth Hill's avatar Seth Hill
Browse files

Issue #3359174 by sethhill, marjina-constantin: Form state errors break nested...

Issue #3359174 by sethhill, marjina-constantin: Form state errors break nested layout paragraphs dialog
parent 3addb567
No related branches found
No related tags found
1 merge request!176#3359174: Form state errors break nested layout paragraphs dialog
Pipeline #235110 passed with warnings
......@@ -373,7 +373,7 @@ abstract class ComponentFormBase extends FormBase implements ComponentFormInterf
* The form element.
*/
public function afterBuild(array $element, FormStateInterface $form_state) {
$parents = array_merge($element['#parents'], [$this->getFormId()]);
$parents = array_merge($element['#parents'], [$this->getFormId(), $element['#paragraph']->bundle()]);
$unprocessed_id = 'edit-' . implode('-', $parents);
$element['#attributes']['data-drupal-selector'] = Html::getId($unprocessed_id);
$element['#dialog_id'] = $unprocessed_id . '-dialog';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment