Skip to content

setDefaultColumns didn't work on ChoiceField if CustomOption Widget Autocomplete is set #7239

@Paddy65305

Description

@Paddy65305

Describe the bug
If I add in my CrudController a ChoiceField and I setDefaultColumns('col-md-12 col-xxl-12') but I use the autocomplete option the Choice Configurator reset my value:
https://github.com/EasyCorp/EasyAdminBundle/blob/4.x/src/Field/Configurator/ChoiceConfigurator.php#L97

To Reproduce
create a CrudController with:
yield ChoiceField::new('property', 'label')
->addCssClass('text-stars')
->setDefaultColumns('col-md-12 col-xxl-12')
->setChoices(['name1' => 1, 'name2' => 2])

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions