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

wrong behavior with the selectcheckbox #1412

Closed
eheslouis opened this issue Jul 6, 2017 · 4 comments
Closed

wrong behavior with the selectcheckbox #1412

eheslouis opened this issue Jul 6, 2017 · 4 comments
Assignees
Milestone

Comments

@eheslouis
Copy link

Current behaviour

While using a fieldFor, the onChange of the selectCheckBox returns the key of the element that was changed.

Expected behaviour

The onChange should return an object containing the key and the newStatus of the key. Even better, if it returned a table of the selected keys.

Versions

Focus-core: 2.1.1
Focus-components: #add-rgaa-updated

@Hartorn Hartorn self-assigned this Jul 7, 2017
@Hartorn Hartorn added the Bug label Jul 7, 2017
@Hartorn Hartorn added this to the 2.2.0 milestone Jul 7, 2017
@Hartorn
Copy link
Contributor

Hartorn commented Jul 7, 2017

Indeed. Behaviour should be : value is an array of key/id, onChange return the new array

Option should be added to keep old behaviour, but the default behaviour should be the new one

@c3dr0x
Copy link
Contributor

c3dr0x commented Jul 10, 2017

@Hartorn
I agree with the new default behavior.

For legacy, do you already have something in mind ?
If I keep both parameters (key, newStatus) the field-component-behaviour._wrappedOnChange will still truncate the newStatus.

I propose for legacy to pass to onChange an object with both keys { key, newStatus }. What do you think ?

@Hartorn
Copy link
Contributor

Hartorn commented Jul 31, 2017

Done in #1414

@Hartorn
Copy link
Contributor

Hartorn commented Nov 15, 2017

Delivered in 2.2.0

@Hartorn Hartorn closed this as completed Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants