Board improvements (#3694)
* New board improvements * Improve board * Fix
This commit is contained in:
@ -94,7 +94,7 @@ export const DoubleTextInput = ({
|
||||
);
|
||||
|
||||
useScopedHotkeys(
|
||||
Key.Escape,
|
||||
[Key.Escape],
|
||||
() => {
|
||||
onEscape({
|
||||
firstValue: firstInternalValue,
|
||||
|
||||
@ -2,6 +2,7 @@ import { useState } from 'react';
|
||||
import { HotkeysEvent } from 'react-hotkeys-hook/dist/types';
|
||||
import TextareaAutosize from 'react-textarea-autosize';
|
||||
import styled from '@emotion/styled';
|
||||
import { Key } from 'ts-key-enum';
|
||||
|
||||
import { IconArrowRight } from '@/ui/display/icon/index';
|
||||
import { Button } from '@/ui/input/button/components/Button';
|
||||
@ -151,7 +152,7 @@ export const AutosizeTextInput = ({
|
||||
);
|
||||
|
||||
useScopedHotkeys(
|
||||
'esc',
|
||||
Key.Escape,
|
||||
(event: KeyboardEvent) => {
|
||||
if (!isFocused) {
|
||||
return;
|
||||
|
||||
@ -94,7 +94,7 @@ export const Dropdown = ({
|
||||
});
|
||||
|
||||
useScopedHotkeys(
|
||||
Key.Escape,
|
||||
[Key.Escape],
|
||||
() => {
|
||||
closeDropdown();
|
||||
},
|
||||
|
||||
@ -66,7 +66,10 @@ export const RightDrawer = () => {
|
||||
|
||||
useScopedHotkeys(
|
||||
[Key.Escape],
|
||||
() => closeRightDrawer(),
|
||||
|
||||
() => {
|
||||
closeRightDrawer();
|
||||
},
|
||||
RightDrawerHotkeyScope.RightDrawer,
|
||||
[setIsRightDrawerOpen],
|
||||
);
|
||||
|
||||
@ -4,4 +4,5 @@ export enum AppHotkeyScope {
|
||||
CommandMenu = 'command-menu',
|
||||
CommandMenuOpen = 'command-menu-open',
|
||||
KeyboardShortcutMenu = 'keyboard-shortcut-menu',
|
||||
KeyboardShortcutMenuOpen = 'keyboard-shortcut-menu-open',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user