Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining a form_option "type" on StringFilter is not working #340

Open
laurentdabbb opened this issue Sep 20, 2024 · 0 comments
Open

Defining a form_option "type" on StringFilter is not working #340

laurentdabbb opened this issue Sep 20, 2024 · 0 comments

Comments

@laurentdabbb
Copy link

Hi,

On a string filter if I define a "form_options.type", this type is ignored and the default value "contains" is used.

In Sylius\Bundle\GridBundle\Form\Type\Filter\StringFilterType class, the field "type" is added only if $options['type'] is not set.
You should add an HiddenType field "type" with the value defined in "form_options.type".

Currently, if we define a "form_options.type", all the requests are executed with a "LIKE '%%'".

Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant