Skip to content

Commit

Permalink
Merge pull request #4429 from mP1/feature/SpreadsheetSuggestBoxCompon…
Browse files Browse the repository at this point in the history
…ent-addXXXListener-suggestBox-addEventListener

SpreadsheetSuggestBoxComponent.addXXXListener suggestBox.addEventList…
  • Loading branch information
mP1 authored Jan 15, 2025
2 parents 76e5a02 + 5ea0a2f commit 27e523f
Showing 1 changed file with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,39 +276,42 @@ public SpreadsheetSuggestBoxComponent<T> addChangeListener(final ChangeListener<

@Override
public SpreadsheetSuggestBoxComponent<T> addClickListener(final EventListener listener) {
this.suggestBox.addEventListener(
return this.addEventListener(
EventType.click,
listener
);
return this;
}

@Override
public SpreadsheetSuggestBoxComponent<T> addFocusListener(final EventListener listener) {
this.suggestBox.addEventListener(
return this.addEventListener(
EventType.focus,
listener
);
return this;
}

@Override
public SpreadsheetSuggestBoxComponent<T> addKeydownListener(final EventListener listener) {
Objects.requireNonNull(listener, "listener");

this.suggestBox.addEventListener(
return this.addEventListener(
EventType.keydown,
listener
);
return this;
}

@Override
public SpreadsheetSuggestBoxComponent<T> addKeyupListener(final EventListener listener) {
return this.addEventListener(
EventType.keyup,
listener
);
}

private SpreadsheetSuggestBoxComponent<T> addEventListener(final EventType eventType,
final EventListener listener) {
Objects.requireNonNull(listener, "listener");

this.suggestBox.addEventListener(
EventType.keyup,
eventType,
listener
);
return this;
Expand Down

0 comments on commit 27e523f

Please sign in to comment.