From ceacd900c649e0aa0d161312d80d1505ec0b2d6a Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Tue, 29 Jul 2025 22:41:57 +0300 Subject: [PATCH] B: Small UI fixes --- .../components/toolbar-graph-selection.tsx | 18 +++++++++--------- .../dialogs/dlg-edit-cst/dlg-edit-cst.tsx | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/rsconcept/frontend/src/features/rsform/components/toolbar-graph-selection.tsx b/rsconcept/frontend/src/features/rsform/components/toolbar-graph-selection.tsx index ed947efb..5d90a017 100644 --- a/rsconcept/frontend/src/features/rsform/components/toolbar-graph-selection.tsx +++ b/rsconcept/frontend/src/features/rsform/components/toolbar-graph-selection.tsx @@ -31,7 +31,7 @@ interface ToolbarGraphSelectionProps extends Styling { export function ToolbarGraphSelection({ className, graph, - value: selected, + value, isCore, isInherited, isCrucial, @@ -40,7 +40,7 @@ export function ToolbarGraphSelection({ }: ToolbarGraphSelectionProps) { const selectedMenu = useDropdown(); const groupMenu = useDropdown(); - const emptySelection = selected.length === 0; + const emptySelection = value.length === 0; function handleSelectReset() { onChange([]); @@ -68,31 +68,31 @@ export function ToolbarGraphSelection({ } function handleExpandOutputs() { - onChange([...selected, ...graph.expandOutputs(selected)]); + onChange([...value, ...graph.expandOutputs(value)]); } function handleExpandInputs() { - onChange([...selected, ...graph.expandInputs(selected)]); + onChange([...value, ...graph.expandInputs(value)]); } function handleSelectMaximize() { selectedMenu.hide(); - onChange(graph.maximizePart(selected)); + onChange(graph.maximizePart(value)); } function handleSelectInvert() { selectedMenu.hide(); - onChange([...graph.nodes.keys()].filter(item => !selected.includes(item))); + onChange([...graph.nodes.keys()].filter(item => !value.includes(item))); } function handleSelectAllInputs() { selectedMenu.hide(); - onChange([...graph.expandInputs(selected)]); + onChange([...value, ...graph.expandInputs(value)]); } function handleSelectAllOutputs() { selectedMenu.hide(); - onChange([...graph.expandOutputs(selected)]); + onChange([...value, ...graph.expandOutputs(value)]); } return ( @@ -166,7 +166,7 @@ export function ToolbarGraphSelection({ icon={} onClick={groupMenu.toggle} /> - +