Dropdown styling not applied unless setting autocomplete property
I am experiencing weird behavior when making dropdowns. First of all, the styling is only applied when the autocomplete property is defined, when selecting a value from the dropdown, the whole input-field suddenly disappears.
Recreate: Make a Formtype with a choicetype.
$builder = new DynamicFormBuilder($builder);
$builder
->add('yesOrNo', ChoiceType::class, [
'choices' => [
'yes' => true,
'no' => false,
],
'placeholder' => 'Select option',
'label' => 'Yes or no?',
'constraints' => [
new NotNull()
],
])
The expected behavior is that styling would be applied, it is not.
$builder = new DynamicFormBuilder($builder);
$builder
->add('yesOrNo', ChoiceType::class, [
'choices' => [
'yes' => true,
'no' => false,
],
'placeholder' => 'Select option',
'label' => 'Yes or no?',
'autocomplete' = 'off', // doesn't matter if on/off
'constraints' => [
new NotNull()
],
])
Now the styling is applied as expected, but when selecting an option from the dropdown, the whole input-field disappears.
I don't think this issue is due to the bundle. I tested it with a new project and everything works fine.
The autocomplete option come from the symfony/ux-autocomplete package ?
Thank you for your answer. Yes that is correct, it comes from ux-autocomplete.