Skip to content

Commit 1dbe927

Browse files
committed
Updating test, reversing default
1 parent 6c08110 commit 1dbe927

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/LiveComponent/src/ComponentWithFormTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private function extractFormValues(FormView $formView): array
253253
// "compound" is how we know if a field holds children. The extra
254254
// "compound_data" is a special flag to workaround the fact that
255255
// the "autocomplete" library fakes their compound fake incorrectly.
256-
$isCompound = $child->vars['compound'] ?? $child->vars['compound_data'] ?? false;
256+
$isCompound = $child->vars['compound_data'] ?? $child->vars['compound'] ?? false;
257257
if ($isCompound && !($child->vars['expanded'] ?? false)) {
258258
$values[$name] = $this->extractFormValues($child);
259259

src/LiveComponent/tests/Fixtures/Form/ComplexFieldType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public function buildForm(FormBuilderInterface $builder, array $options)
1919
public function finishView(FormView $view, FormInterface $form, array $options)
2020
{
2121
// try to confuse ComponentWithFormTrait
22+
// mimics what autocomplete does
2223
$view->vars['compound'] = false;
24+
$view->vars['compound_data'] = true;
2325
}
2426
}

0 commit comments

Comments
 (0)