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

Added callback with possibility to modify each individual item in res… #6789

Merged
merged 3 commits into from
Jan 20, 2021
Merged

Added callback with possibility to modify each individual item in res… #6789

merged 3 commits into from
Jan 20, 2021

Conversation

klavig
Copy link
Contributor

@klavig klavig commented Jan 20, 2021

Subject

I am targeting this branch, because this PR adds extra functionality to sonata_type_model_autocomplete, fixes few glitches & extends customization options.

Changelog

### Added
- A callback with a possibility to modify each individual item in the response.
- A way to customize any autocomplete select2 properties in js via adding sonata_type_model_autocomplete_select2_options_js block before initializing select2 element because select2 doesn't allow modification of several options after it has been initialized, you can only destroy it and initialize again from scratch.
- Set error bubbling to false - prevent passing error to parent form elements, which occurs by default for compound form types.

### Changed
- The autocomplete item list is now independent of filters set in the corresponding list via removing its filters. Before these changes, it returned only items that matched the selected filter.

@klavig
Copy link
Contributor Author

klavig commented Jan 20, 2021

@VincentLanglet hey, I have re-created the PR, maybe u got the time to look at it

@VincentLanglet VincentLanglet requested a review from a team January 20, 2021 09:33
VincentLanglet
VincentLanglet previously approved these changes Jan 20, 2021
@VincentLanglet VincentLanglet requested a review from a team January 20, 2021 13:10
Copy link
Member

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add this to the docs, otherwise this feature could not be adopted well, thanks!

@klavig
Copy link
Contributor Author

klavig commented Jan 20, 2021

@VincentLanglet, @OskarStark done

@klavig klavig requested a review from OskarStark January 20, 2021 14:13
@VincentLanglet VincentLanglet requested a review from a team January 20, 2021 14:22
@OskarStark OskarStark merged commit 534d871 into sonata-project:3.x Jan 20, 2021
@klavig klavig deleted the autocomplete-customization branch January 21, 2021 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants