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

fix: change checked condition on button removal #160

Merged
merged 2 commits into from
Sep 9, 2020

Conversation

DiegoCardoso
Copy link
Contributor

Prior this change, the conditional checks whether the button being removed is checked or not, in order of resetting the group value.
That works well, unless a new button is checked right after the checked button is removed. Since the resetting logic is done inside a FlattenedNodesObserver, it happens asynchronously and the selected button being removed is no longer the actual value of the group, therefore no reset is needed.

Fix vaadin/vaadin-radio-button-flow#108

Prior this change, the conditional checks whether the button being
removed is checked or not, in order of resetting the group value.
That works well, unless a new button is checked right after the
checked button is removed. Since the resetting logic is done inside
a FlattenedNodesObserver, it happens asynchronously and the selected
button being removed is no longer the actual value of the group,
therefore no reset is needed.

Fix vaadin/vaadin-radio-group-flow#108
@DiegoCardoso DiegoCardoso force-pushed the fix/removing-and-setting-value branch from 019e719 to 2202ac2 Compare September 9, 2020 06:54
@DiegoCardoso DiegoCardoso merged commit 7990f46 into master Sep 9, 2020
@DiegoCardoso DiegoCardoso deleted the fix/removing-and-setting-value branch September 9, 2020 13:48
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