aboutsummaryrefslogtreecommitdiff
path: root/src/console/components/CommandPrompt.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/components/CommandPrompt.tsx')
-rw-r--r--src/console/components/CommandPrompt.tsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/console/components/CommandPrompt.tsx b/src/console/components/CommandPrompt.tsx
index 0312fe4..89acf57 100644
--- a/src/console/components/CommandPrompt.tsx
+++ b/src/console/components/CommandPrompt.tsx
@@ -22,7 +22,7 @@ const CommandPromptInner: React.FC<Props> = ({ initialInputValue }) => {
const hide = useHide();
const [inputValue, setInputValue] = React.useState(initialInputValue);
const debouncedValue = useDebounce(inputValue, 100);
- const { completions, updateCompletions } = useCompletions();
+ const { completions } = useCompletions(debouncedValue);
const { select, currentValue, selectNext, selectPrev } =
useSelectCompletion();
const execCommand = useExecCommand();
@@ -83,10 +83,6 @@ const CommandPromptInner: React.FC<Props> = ({ initialInputValue }) => {
setInputValue(text);
};
- React.useEffect(() => {
- updateCompletions(debouncedValue);
- }, [debouncedValue]);
-
return (
<ConsoleWrapper>
<Completion