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

allow to add custom query params for autocompleteEnpointUrl #5314

Open
wants to merge 4 commits into
base: 4.x
Choose a base branch
from

Conversation

erelke
Copy link
Contributor

@erelke erelke commented Jun 23, 2022

Allow to add custom query params for autocomplete in AssociationField.

yield AssociationField::new('something')->autocomplete(['key' => 'value']);

@michaelKaefer
Copy link
Contributor

What is the usecase?

@erelke
Copy link
Contributor Author

erelke commented Aug 13, 2022

@michaelKaefer Is usefull if you need to filter your autocomplete results. Example: If you have User entity, and in one page you need enabled users, in second page you need womans, in third you need admin users. In this case you can pass the needed filter.

@michaelKaefer
Copy link
Contributor

I think you can already use AssociationField::new('...')->setQueryBuilder(...) for this or am I missing something?

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

Successfully merging this pull request may close these issues.

2 participants