From 4d3264a92fc3e7a58fef127d9a4ac7492542188e Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Tue, 4 Nov 2025 12:51:06 +0400 Subject: [PATCH] fix: fixed options editor --- .../AttrSelectEditorModal/components/CreateOptionButton.tsx | 6 +++++- .../AttrSelectEditorModal/components/OptionsTable.tsx | 1 + .../AttrSelectEditorModal/hooks/useOptionsActions.tsx | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/attributes/modals/AttrSelectEditorModal/components/CreateOptionButton.tsx b/src/app/attributes/modals/AttrSelectEditorModal/components/CreateOptionButton.tsx index 716cb0a..97480d0 100644 --- a/src/app/attributes/modals/AttrSelectEditorModal/components/CreateOptionButton.tsx +++ b/src/app/attributes/modals/AttrSelectEditorModal/components/CreateOptionButton.tsx @@ -24,7 +24,11 @@ const CreateOptionButton = () => { return ( - + diff --git a/src/app/attributes/modals/AttrSelectEditorModal/components/OptionsTable.tsx b/src/app/attributes/modals/AttrSelectEditorModal/components/OptionsTable.tsx index 2b908d3..45feeda 100644 --- a/src/app/attributes/modals/AttrSelectEditorModal/components/OptionsTable.tsx +++ b/src/app/attributes/modals/AttrSelectEditorModal/components/OptionsTable.tsx @@ -26,6 +26,7 @@ const OptionsTable = () => { styles={{ table: { width: "100%", + minHeight: options.length === 0 ? "150px" : "auto", }, header: { zIndex: 1 }, }} diff --git a/src/app/attributes/modals/AttrSelectEditorModal/hooks/useOptionsActions.tsx b/src/app/attributes/modals/AttrSelectEditorModal/hooks/useOptionsActions.tsx index 40c83e8..9812b0f 100644 --- a/src/app/attributes/modals/AttrSelectEditorModal/hooks/useOptionsActions.tsx +++ b/src/app/attributes/modals/AttrSelectEditorModal/hooks/useOptionsActions.tsx @@ -51,6 +51,7 @@ const useOptionsActions = ({ queryKey, select }: Props) => { optionCrud.onCreate(createOptionForm.values, () => { notifications.success({ message: "Опция успешно создана" }); createOptionForm.reset(); + setIsCreatingOption(false); }); };