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

Select sends incorrect oldvalue when clearing #967

Closed
howudodat opened this issue Oct 5, 2024 · 0 comments
Closed

Select sends incorrect oldvalue when clearing #967

howudodat opened this issue Oct 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working version 2.x.x Version 2.x.x issues
Milestone

Comments

@howudodat
Copy link

Describe the bug
Select with dui_clearable
AbstractSelect.java line 209 (ClickListener for the delete button) calls clearValue(false)
Select.java line 89 clearValue() calls super.clearValue() before setting selectedOption to null
AbstractSelect.java line 295 (inside clearValue()) calls triggerChangeListeners(oldValue, getValue())
which results in the change listener being called with oldValue == newValue instead of oldValue being the old selection and newValue being null since the selection is being cleared

To Reproduce
create a clearable select, select a value, click on clear icon

Expected behavior
newValue should be null when clearing

@vegegoku vegegoku self-assigned this Oct 6, 2024
@vegegoku vegegoku added bug Something isn't working version 2.x.x Version 2.x.x issues labels Oct 6, 2024
@github-project-automation github-project-automation bot moved this to To do in Domino UI Oct 6, 2024
@vegegoku vegegoku added this to the 2.0.3 milestone Oct 6, 2024
@vegegoku vegegoku closed this as completed Oct 6, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in Domino UI Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working version 2.x.x Version 2.x.x issues
Projects
Status: Done
Development

No branches or pull requests

2 participants