Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07cdd4867a |
@@ -284,6 +284,13 @@ export function ActionBar({
|
||||
setSuggestionIndex(-1);
|
||||
};
|
||||
|
||||
const dismissSuggestions = () => {
|
||||
setSuggestions([]);
|
||||
setPcMatches([]);
|
||||
setQueued(null);
|
||||
setSuggestionIndex(-1);
|
||||
};
|
||||
|
||||
const confirmQueued = () => {
|
||||
if (!queued) return;
|
||||
for (let i = 0; i < queued.count; i++) {
|
||||
@@ -395,7 +402,7 @@ export function ActionBar({
|
||||
e.preventDefault();
|
||||
handleEnter();
|
||||
} else if (e.key === "Escape") {
|
||||
clearInput();
|
||||
dismissSuggestions();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -514,7 +521,7 @@ export function ActionBar({
|
||||
pcMatches={pcMatches}
|
||||
suggestionIndex={suggestionIndex}
|
||||
queued={queued}
|
||||
onDismiss={clearInput}
|
||||
onDismiss={dismissSuggestions}
|
||||
onClickSuggestion={handleClickSuggestion}
|
||||
onSetSuggestionIndex={setSuggestionIndex}
|
||||
onSetQueued={setQueued}
|
||||
|
||||
Reference in New Issue
Block a user