fix: fixed options editor

This commit is contained in:
2025-11-04 12:51:06 +04:00
parent 33dd1e1c0f
commit 4d3264a92f
3 changed files with 7 additions and 1 deletions

View File

@ -24,7 +24,11 @@ const CreateOptionButton = () => {
return ( return (
<Flex gap={"xs"}> <Flex gap={"xs"}>
<TextInput {...createOptionForm.getInputProps("name")} flex={1} /> <TextInput
{...createOptionForm.getInputProps("name")}
flex={1}
placeholder={"Название"}
/>
<ActionIconWithTip <ActionIconWithTip
tipLabel={"Сохранить"} tipLabel={"Сохранить"}
onClick={onFinishCreating}> onClick={onFinishCreating}>

View File

@ -26,6 +26,7 @@ const OptionsTable = () => {
styles={{ styles={{
table: { table: {
width: "100%", width: "100%",
minHeight: options.length === 0 ? "150px" : "auto",
}, },
header: { zIndex: 1 }, header: { zIndex: 1 },
}} }}

View File

@ -51,6 +51,7 @@ const useOptionsActions = ({ queryKey, select }: Props) => {
optionCrud.onCreate(createOptionForm.values, () => { optionCrud.onCreate(createOptionForm.values, () => {
notifications.success({ message: "Опция успешно создана" }); notifications.success({ message: "Опция успешно создана" });
createOptionForm.reset(); createOptionForm.reset();
setIsCreatingOption(false);
}); });
}; };