From a9ccbec19024a4dcba71f0a94611f846b2f749e7 Mon Sep 17 00:00:00 2001 From: mgmeyers Date: Sat, 20 Apr 2024 18:35:56 -0700 Subject: [PATCH] Ensure clicking on suggestions doesn't close the item form --- src/components/Item/ItemForm.tsx | 2 +- src/components/Lane/LaneForm.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Item/ItemForm.tsx b/src/components/Item/ItemForm.tsx index 7d9c8923..dc014eba 100644 --- a/src/components/Item/ItemForm.tsx +++ b/src/components/Item/ItemForm.tsx @@ -22,7 +22,7 @@ export function ItemForm({ addItems, editState, setEditState, hideButton }: Item const clear = () => setEditState(EditingState.cancel); const clickOutsideRef = useOnclickOutside(clear, { - ignoreClass: [c('ignore-click-outside'), 'mobile-toolbar'], + ignoreClass: [c('ignore-click-outside'), 'mobile-toolbar', 'suggestion-container'], }); const createItem = async (title: string) => { diff --git a/src/components/Lane/LaneForm.tsx b/src/components/Lane/LaneForm.tsx index c2cd0c8b..ce938edd 100644 --- a/src/components/Lane/LaneForm.tsx +++ b/src/components/Lane/LaneForm.tsx @@ -19,7 +19,7 @@ export function LaneForm({ onNewLane, closeLaneForm }: LaneFormProps) { const editorRef = useRef(); const inputRef = useRef(); const clickOutsideRef = useOnclickOutside(() => closeLaneForm(), { - ignoreClass: c('ignore-click-outside'), + ignoreClass: [c('ignore-click-outside'), 'mobile-toolbar', 'suggestion-container'], }); const { boardModifiers, stateManager } = useContext(KanbanContext);