From 017c95ac9bc21dd2003f309915dd149ca5a059d8 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Fri, 15 Sep 2023 23:48:04 +0300 Subject: [PATCH] Fix hotkey recognition --- .../frontend/src/pages/RSFormPage/EditorItems.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx index cafcac7c..a26b6a4e 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx @@ -28,7 +28,7 @@ interface EditorItemsProps { } function EditorItems({ onOpenEdit, onCreateCst, onDeleteCst }: EditorItemsProps) { - const { colors } = useConceptTheme(); + const { colors, mainHeight } = useConceptTheme(); const windowSize = useWindowSize(); const { schema, isEditable, cstMoveTo, resetAliases } = useRSForm(); const [selected, setSelected] = useState([]); @@ -136,6 +136,7 @@ function EditorItems({ onOpenEdit, onCreateCst, onDeleteCst }: EditorItemsProps) if (!isEditable) { return; } + console.log(1); if (event.key === 'Delete' && selected.length > 0) { event.preventDefault(); handleDelete(); @@ -288,7 +289,12 @@ function EditorItems({ onOpenEdit, onCreateCst, onDeleteCst }: EditorItemsProps) ], [colors]); return ( -
+
Выбор {selected.length} из {schema?.stats?.count_all ?? 0} @@ -352,7 +358,7 @@ function EditorItems({ onOpenEdit, onCreateCst, onDeleteCst }: EditorItemsProps)
-
+