diff --git a/rsconcept/frontend/src/pages/CreateItemPage/FormCreateItem.tsx b/rsconcept/frontend/src/pages/CreateItemPage/FormCreateItem.tsx index aa7da132..50400b6d 100644 --- a/rsconcept/frontend/src/pages/CreateItemPage/FormCreateItem.tsx +++ b/rsconcept/frontend/src/pages/CreateItemPage/FormCreateItem.tsx @@ -114,24 +114,33 @@ function FormCreateItem() { handleSelectLocation(initLocation); }, [initLocation, handleSelectLocation]); + useLayoutEffect(() => { + if (itemType !== LibraryItemType.RSFORM) { + setFile(undefined); + setFileName(''); + } + }, [itemType]); + return (

- - - } - onClick={() => inputRef.current?.click()} - /> - + {itemType == LibraryItemType.RSFORM ? ( + + + } + onClick={() => inputRef.current?.click()} + /> + + ) : null} Создание схемы