-
-
Notifications
You must be signed in to change notification settings - Fork 169
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 extractElementAttributes to use a checkbox list #147
Labels
enhancement
New feature or request
Milestone
Comments
Are you thinking we should marshal attributes only for |
Right. On the server side you’d get an array of checked options as in a multiple select |
julianrubisch
added a commit
to julianrubisch/stimulus_reflex
that referenced
this issue
Apr 26, 2020
julianrubisch
added a commit
to julianrubisch/stimulus_reflex
that referenced
this issue
Apr 26, 2020
julianrubisch
added a commit
to julianrubisch/stimulus_reflex
that referenced
this issue
Apr 26, 2020
2 tasks
julianrubisch
added a commit
to julianrubisch/stimulus_reflex
that referenced
this issue
Apr 26, 2020
julianrubisch
added a commit
to julianrubisch/stimulus_reflex
that referenced
this issue
Apr 27, 2020
julianrubisch
added a commit
to julianrubisch/stimulus_reflex
that referenced
this issue
Apr 27, 2020
julianrubisch
added a commit
to julianrubisch/stimulus_reflex
that referenced
this issue
May 14, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
extractElementAttributes
for the moment returns multiple values forselect
tags withmultiple: true
:https://github.com/hopsoft/stimulus_reflex/blob/480ee76dccf4ddc212602d1c3dee01216b6369ab/javascript/attributes.js#L37
A common scenario is to use a checkbox list for an association collection, as in
collection_check_boxes
:https://devdocs.io/rails~6.0/actionview/helpers/formoptionshelper#method-i-collection_check_boxes
It would be nice if SR supported that out of the box.
Describe the solution you'd like
The hidden complexity lies in the fact that we'd have to consider multiple elements in
extractElementAttributes
, not just the one triggering the reflex. Still I think a library such as SR should take on that complexity instead of imposing it on the back end developer.Specifically, I discovered this shortage when working on the permalink expo example and trying to employ a button group: https://github.com/hopsoft/stimulus_reflex_expo/pull/26/files#diff-23c58647594fccfb30d0b54554851d59R15
The text was updated successfully, but these errors were encountered: