fix: fixed options editor
This commit is contained in:
@ -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}>
|
||||||
|
|||||||
@ -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 },
|
||||||
}}
|
}}
|
||||||
|
|||||||
@ -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);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user