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

AbstractSelect selectByKey calling deselect #864

Closed
howudodat opened this issue Oct 26, 2023 · 0 comments
Closed

AbstractSelect selectByKey calling deselect #864

howudodat opened this issue Oct 26, 2023 · 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
selectByKey is actually deselecting

To Reproduce
see AbstractSelect.java line 596. selectAt and selectByValue both call onOptionSelected, selectByKey calls onOptionDeselected

Expected behavior
select the object

  public C selectAt(int index) {
    findOptionByIndex(index).ifPresent(this::onOptionSelected);
    return (C) this;
  }
  public C selectByKey(String key) {
    findOptionByKey(key).ifPresent(this::onOptionDeselected);
    return (C) this;
  }
  public C selectByValue(T value) {
    findOptionByValue(value).ifPresent(this::onOptionSelected);
    return (C) this;
  }

@vegegoku vegegoku self-assigned this Oct 26, 2023
@vegegoku vegegoku added bug Something isn't working version 2.x.x Version 2.x.x issues labels Oct 26, 2023
@vegegoku vegegoku added this to the 2.0.0-RC4 milestone Oct 26, 2023
@vegegoku vegegoku changed the title V2 AbstractSelect selectByKey calling deselect AbstractSelect selectByKey calling deselect Oct 26, 2023
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