Skip to content

Commit

Permalink
fix(js): forward event to all onInput calls
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Sep 17, 2020
1 parent 77487a6 commit c5492aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/autocomplete-core/src/createAutocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export function createAutocomplete<
function refresh() {
return onInput({
query: store.getState().query,
event: new Event('input'),
store,
props,
setHighlightedIndex,
Expand Down
2 changes: 2 additions & 0 deletions packages/autocomplete-core/src/onKeyDown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function onKeyDown<TItem>({
if (query) {
onInput({
query,
event,
store,
props,
setHighlightedIndex,
Expand Down Expand Up @@ -133,6 +134,7 @@ export function onKeyDown<TItem>({
} else {
onInput({
query: itemValue,
event,
store,
props,
setHighlightedIndex,
Expand Down

0 comments on commit c5492aa

Please sign in to comment.