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

change listeners not fired when SuggestBox cleared from keyboard #934

Closed
salashnik opened this issue May 17, 2024 · 0 comments
Closed

change listeners not fired when SuggestBox cleared from keyboard #934

salashnik opened this issue May 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working version 2.x.x Version 2.x.x issues
Milestone

Comments

@salashnik
Copy link
Contributor

i see some problems in code:

  1. delete key not handled anyway :(
  2. look in AbstractSuggestBox keyDown.onBackspace code:
....
                  .onBackspace(
                      evt -> {
                        if (!isReadOnly() && !isDisabled()) {
                          if (isNull(getInputStringValue()) || getInputStringValue().isEmpty()) {
                            evt.stopPropagation();
                            evt.preventDefault();
                            onBackspace();
                          }
                        }
                      });
....

getInputString() is not empy in onKeyDown when deleting last character...
our AbstractSuggestBox.onBackspace will be fired only when backspace wil be pressed on empty input
3. SuggestBox.onBackspace code:

    if (nonNull(selectedOption)) {
      selectedOption.remove();
      selectedOption = null;
    }

no any handlers fired :(
as i think onBackspace must simple call clearValue

@salashnik salashnik changed the title change listeners not fired when SuggestBox cleared from keyboard change listeners not fired when SuggestBox cleared from keyboard (v2) May 17, 2024
@salashnik salashnik changed the title change listeners not fired when SuggestBox cleared from keyboard (v2) change listeners not fired when SuggestBox cleared from keyboard (domino v2) May 17, 2024
@salashnik salashnik changed the title change listeners not fired when SuggestBox cleared from keyboard (domino v2) change listeners not fired when SuggestBox cleared from keyboard (domino-ui v2) May 17, 2024
@vegegoku vegegoku self-assigned this Jun 25, 2024
@vegegoku vegegoku added bug Something isn't working version 2.x.x Version 2.x.x issues labels Jun 25, 2024
@vegegoku vegegoku added this to the 2.0.2 milestone Jun 25, 2024
@vegegoku vegegoku changed the title change listeners not fired when SuggestBox cleared from keyboard (domino-ui v2) change listeners not fired when SuggestBox cleared from keyboard Jul 14, 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