2
0

fix(editor): 🐛 Variables button in text editor

This commit is contained in:
Baptiste Arnaud
2022-03-10 09:41:06 +01:00
parent 4767cdc542
commit 36838f05d3
3 changed files with 7 additions and 1 deletions

View File

@@ -144,6 +144,7 @@ export const TextBubbleEditor = ({ initialValue, onClose }: Props) => {
rounded="md"
bgColor="white"
w="250px"
zIndex={10}
>
<VariableSearchInput
onSelectVariable={handleVariableSelected}

View File

@@ -60,7 +60,7 @@ export const VariableSearchInput = ({
useEffect(() => {
const variable = variables.find((v) => v.name === debouncedInputValue)
onSelectVariable(variable)
if (variable) onSelectVariable(variable)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [debouncedInputValue])