feat: подсправочники — отображение в форме задачи, фильтрация и отображение значений
This commit is contained in:
@@ -94,10 +94,12 @@ export default function SubdirectoryFieldConfig({
|
||||
};
|
||||
|
||||
const handleSubdirectoryChange = (value: string) => {
|
||||
const newSubdirectory = value === 'none' ? undefined : subdirectories.find((s) => s.id?.toString() === value || s.childTableId?.toString() === value);
|
||||
updateField(index, {
|
||||
options: {
|
||||
...field.options,
|
||||
subdirectoryId: value === 'none' ? undefined : parseInt(value),
|
||||
subdirectoryId: newSubdirectory?.id,
|
||||
childTableId: newSubdirectory?.childTableId,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user