Skip to content

Commit

Permalink
SpreadsheetSuggestBoxComponent.addXXXListener suggestBox.addEventList…
Browse files Browse the repository at this point in the history
…ener
  • Loading branch information
mP1 committed Jan 15, 2025
1 parent 76e5a02 commit 5ea0a2f
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 5ea0a2f

Please sign in to comment.