diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx index e79243ff..fb47dc8c 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta/ToolbarConstituenta.tsx @@ -49,7 +49,7 @@ function ToolbarConstituenta({ const controller = useRSEdit(); return ( - + {controller.schema && controller.schema?.oss.length > 0 ? ( void; denseThreshold?: number; + autoScroll?: boolean; maxHeight: string; } @@ -25,6 +26,7 @@ const columnHelper = createColumnHelper(); function TableSideConstituents({ items, activeCst, + autoScroll = true, onOpenEdit, maxHeight, denseThreshold = 9999 @@ -38,17 +40,19 @@ function TableSideConstituents({ if (!activeCst) { return; } - setTimeout(() => { - const element = document.getElementById(`${prefixes.cst_side_table}${activeCst.alias}`); - if (element) { - element.scrollIntoView({ - behavior: 'smooth', - block: 'center', - inline: 'end' - }); - } - }, PARAMETER.refreshTimeout); - }, [activeCst]); + if (autoScroll) { + setTimeout(() => { + const element = document.getElementById(`${prefixes.cst_side_table}${activeCst.alias}`); + if (element) { + element.scrollIntoView({ + behavior: 'smooth', + block: 'center', + inline: 'end' + }); + } + }, PARAMETER.refreshTimeout); + } + }, [activeCst, autoScroll]); useLayoutEffect(() => { setColumnVisibility(prev => { diff --git a/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ViewConstituents.tsx b/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ViewConstituents.tsx index 0e435ac2..8ce5f480 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ViewConstituents.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/ViewConstituents/ViewConstituents.tsx @@ -46,6 +46,7 @@ function ViewConstituents({ expression, schema, activeCst, isBottom, onOpenEdit items={filteredData} activeCst={activeCst} onOpenEdit={onOpenEdit} + autoScroll={!isBottom} denseThreshold={COLUMN_EXPRESSION_HIDE_THRESHOLD} /> ), @@ -55,10 +56,10 @@ function ViewConstituents({ expression, schema, activeCst, isBottom, onOpenEdit return (