Skip to content

Commit

Permalink
fix(core): don't complete query when closed
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Nov 5, 2020
1 parent af04ae1 commit 86adc65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/autocomplete-core/src/getCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface GetCompletionProps<TItem> {
export function getCompletion<TItem>({
state,
}: GetCompletionProps<TItem>): string | null {
if (state.selectedItemId === null) {
if (state.isOpen === false || state.selectedItemId === null) {
return null;
}

Expand Down

0 comments on commit 86adc65

Please sign in to comment.