Skip to content

Commit

Permalink
Ensure clicking on suggestions doesn't close the item form
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeyers committed Apr 21, 2024
1 parent 7f02b52 commit a9ccbec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Item/ItemForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Lane/LaneForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function LaneForm({ onNewLane, closeLaneForm }: LaneFormProps) {
const editorRef = useRef<EditorView>();
const inputRef = useRef<HTMLTextAreaElement>();
const clickOutsideRef = useOnclickOutside(() => closeLaneForm(), {
ignoreClass: c('ignore-click-outside'),
ignoreClass: [c('ignore-click-outside'), 'mobile-toolbar', 'suggestion-container'],
});

const { boardModifiers, stateManager } = useContext(KanbanContext);
Expand Down

0 comments on commit a9ccbec

Please sign in to comment.