lexik / LexikFormFilterBundle

This Symfony bundle aim to provide classes to build some form filters and then build a doctrine query from this form filter.
MIT License
389 stars 119 forks source link

Options 'data' does not work for EntityFilterType #340

Closed YoukeZhang closed 3 years ago

YoukeZhang commented 3 years ago

I set 'data' for EntityFilterType, but there is no selected value for this form feild. $defaultData is an object instance of MyEntity $builder ->add('myEntity', Filters\EntityFilterType::class, [ 'class' => MyEntity::class, 'data' => $defaultData, ]);