From b118c64b9b7a8d0c01684fa061799a4aa1240232 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Fri, 1 Dec 2023 02:57:19 +0300 Subject: [PATCH] UI fixe for rslist scroll --- .../RSFormPage/EditorRSList/EditorRSList.tsx | 18 ++++++++++++------ .../frontend/src/pages/RSFormPage/RSTabs.tsx | 3 ++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorRSList/EditorRSList.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorRSList/EditorRSList.tsx index 84b17900..e4c1daaa 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorRSList/EditorRSList.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorRSList/EditorRSList.tsx @@ -26,7 +26,7 @@ interface EditorRSListProps { } function EditorRSList({ onOpenEdit, onCreateCst, onDeleteCst, onTemplates }: EditorRSListProps) { - const { colors, mainHeight } = useConceptTheme(); + const { colors, noNavigation } = useConceptTheme(); const windowSize = useWindowSize(); const { schema, editorMode: isEditable, cstMoveTo, resetAliases } = useRSForm(); const [selected, setSelected] = useState([]); @@ -289,15 +289,21 @@ function EditorRSList({ onOpenEdit, onCreateCst, onDeleteCst, onTemplates }: Edi }) ], [colors]); + const tableHeight = useMemo( + () => { + return !noNavigation ? + 'calc(100vh - 7.2rem - 4px)' + : 'calc(100vh - 4.4rem - 4px)'; + }, [noNavigation]); + return (
-
+
- Выбор {selected.length} из {schema?.stats?.count_all ?? 0} + {`Выбор ${selected.length} из ${schema?.stats?.count_all ?? 0}`}
-
+
0) ? schema.items[0].id : undefined)); + setIsModified(false); return () => setNoFooter(false); - }, [search, setActiveTab, setActiveID, schema, setNoFooter]); + }, [search, setActiveTab, setActiveID, schema, setNoFooter, setIsModified]); function onSelectTab(index: number) { navigateTab(index, activeID);