feat: add DropdownMenuInput and use as view name input in board (#1680)

Closes #1510
This commit is contained in:
Thaïs
2023-09-20 21:53:35 +02:00
committed by GitHub
parent 78b666f457
commit 772d54d29f
16 changed files with 284 additions and 249 deletions
@@ -1,4 +1,7 @@
import { useResetRecoilState } from 'recoil';
import { DropdownButton } from '@/ui/dropdown/components/DropdownButton';
import { viewEditModeState } from '@/ui/view-bar/states/viewEditModeState';
import { BoardOptionsDropdownKey } from '../types/BoardOptionsDropdownKey';
@@ -17,6 +20,8 @@ export const BoardOptionsDropdown = ({
customHotkeyScope,
onStageAdd,
}: BoardOptionsDropdownProps) => {
const resetViewEditMode = useResetRecoilState(viewEditModeState);
return (
<DropdownButton
buttonComponents={<BoardOptionsDropdownButton />}
@@ -28,6 +33,7 @@ export const BoardOptionsDropdown = ({
}
dropdownHotkeyScope={customHotkeyScope}
dropdownId={BoardOptionsDropdownKey}
onClickOutside={resetViewEditMode}
/>
);
};