diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx index 2762c5d21..d0e6b3c77 100644 --- a/src/frontend/src/components/inputComponent/index.tsx +++ b/src/frontend/src/components/inputComponent/index.tsx @@ -1,6 +1,7 @@ import { Listbox, Transition } from "@headlessui/react"; import * as Form from "@radix-ui/react-form"; import { Fragment, useEffect, useRef, useState } from "react"; +import { useGlobalVariablesStore } from "../../stores/globalVariables"; import { InputComponentType } from "../../types/components"; import { handleKeyDown } from "../../utils/reactflowUtils"; import { classNames } from "../../utils/utils"; @@ -26,13 +27,12 @@ export default function InputComponent({ const [pwdVisible, setPwdVisible] = useState(false); const refInput = useRef(null); const [showOptions, setShowOptions] = useState(false); - const [filteredOpts, setFilteredValue] = useState([ - "key", - "key2", - "key3", - "key4", - "key5", - ]); + const globalVariablesEntries = useGlobalVariablesStore( + (state) => state.globalVariablesEntries + ); + const [filteredOpts, setFilteredValue] = useState( + globalVariablesEntries + ); // Clear component state useEffect(() => {