-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
[LiveComponent] Checkbox check/uncheck doesn't trigger component update #906
Comments
This test fails
But this one pass
So, it looks like the model name matter, but it shouldn't. |
Hi welcoMatic ! I think the trouble comes from Changing
to
will make it work. The change could otherwise be done in |
Answering myself, the proper way for
|
…dling (welcoMattic) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [LiveComponent] Fix array valued checkboxes change event handling | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Tickets | Fix symfony/ux#906 | License | MIT As described in the linked issue, the event `change` of checkboxes weren't fully triggered (it didn't trigger AJAX request). It was because of the always-equals values of the pre-checked value attribute of the element and the after-change-event value of the element. Thanks `@Jim56450` for the help! Commits ------- 0e94fec4 [LiveComponent] Fix array valued checkboxes change event handling
…dling (welcoMattic) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [LiveComponent] Fix array valued checkboxes change event handling | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Tickets | Fix symfony/ux#906 | License | MIT As described in the linked issue, the event `change` of checkboxes weren't fully triggered (it didn't trigger AJAX request). It was because of the always-equals values of the pre-checked value attribute of the element and the after-change-event value of the element. Thanks `@Jim56450` for the help! Commits ------- 0e94fec4 [LiveComponent] Fix array valued checkboxes change event handling
Based on the following documentation I tried to build a simple list filter based on checkboxes:
Code
FilterMachines.php
filter_machines.html.twig
index.html.twig (rendered by a dead simple FooController)
To reproduce:
Versions:
Symfony 6.2
Webpack Encore Bundle 1.17
UX LiveComponent 2.9
The text was updated successfully, but these errors were encountered: