diff --git a/rsconcept/frontend/src/components/Common/Button.tsx b/rsconcept/frontend/src/components/Common/Button.tsx index 0e2f9524..c4458d47 100644 --- a/rsconcept/frontend/src/components/Common/Button.tsx +++ b/rsconcept/frontend/src/components/Common/Button.tsx @@ -27,7 +27,7 @@ function Button({ disabled={disabled ?? loading} onClick={onClick} title={tooltip} - className={`inline-flex items-center gap-2 align-middle justify-center ${padding} ${borderClass} ${colorClass} ${widthClass} ${cursor}`} + className={`inline-flex items-center gap-2 align-middle justify-center select-none ${padding} ${borderClass} ${colorClass} ${widthClass} ${cursor}`} {...props} > {icon && {icon}} diff --git a/rsconcept/frontend/src/components/Common/SubmitButton.tsx b/rsconcept/frontend/src/components/Common/SubmitButton.tsx index 84ef8293..04b6b66f 100644 --- a/rsconcept/frontend/src/components/Common/SubmitButton.tsx +++ b/rsconcept/frontend/src/components/Common/SubmitButton.tsx @@ -8,7 +8,7 @@ interface SubmitButtonProps { function SubmitButton({ text = 'ОК', icon, disabled, loading = false }: SubmitButtonProps) { return ( } {!noNavigation &&
-
+
diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx index 3713dd73..19fc76ce 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorItems.tsx @@ -247,7 +247,7 @@ function EditorItems({ onOpenEdit, onCreateCst, onDeleteCst }: EditorItemsProps) return (
diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx index 5c34b2b4..dc64f2a7 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph.tsx @@ -212,6 +212,11 @@ function EditorTermGraph({ onOpenEdit }: EditorTermGraphProps) { focusOnSelect: false }); + const allSelected: string[] = useMemo( + () => { + return [ ... selectedDismissed.map(id => String(id)), ... selections]; + }, [selectedDismissed, selections]); + const handleRecreate = useCallback( () => { graphRef.current?.resetControls(); @@ -239,6 +244,12 @@ function EditorTermGraph({ onOpenEdit }: EditorTermGraphProps) { if (onNodeClick) onNodeClick(node); }, [onNodeClick, selections, onOpenEdit]); + const handleCanvasClick = useCallback( + (event: MouseEvent) => { + setSelectedDismissed([]); + if (onCanvasClick) onCanvasClick(event); + }, [onCanvasClick]); + function getOptions() { return { noHermits: noHermits, @@ -301,7 +312,7 @@ function EditorTermGraph({ onOpenEdit }: EditorTermGraphProps) { initial={getOptions()} onConfirm={handleChangeOptions} />} -
+
{hoverCst &&
} + +
+ Выбраны + + {allSelected.length} из {schema?.stats?.count_all ?? 0} + +
+ + +