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

[Autocomplete] max_results option is not passed to parent entity #538

Merged

Conversation

daFish
Copy link
Contributor

@daFish daFish commented Nov 9, 2022

Q A
Bug fix? yes
New feature? no
Tickets none
License MIT

There seems to be an oversight from #478 when it comes to passing the option from types that use #[AsEntityAutocompleteField].

This fix removes the unsetting of $options['max_results'] from the AutocompleteEntityTypeSubscriber to allow passing the information. I also extended the tests to cover this case.

@daFish daFish force-pushed the fix/autocomplete-max-results-for-ajax branch from 297918e to 65af192 Compare November 9, 2022 10:28
@daFish daFish marked this pull request as ready for review November 9, 2022 10:33
@daFish daFish force-pushed the fix/autocomplete-max-results-for-ajax branch from 65af192 to 43e74fe Compare November 9, 2022 11:01
@weaverryan
Copy link
Member

Great catch and excellent coverage in the test. Thank you @daFish!

@weaverryan weaverryan merged commit 2f9b942 into symfony:2.x Nov 9, 2022
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