From c9245855b96fa83e94ba08fe187ed8a083429e9b Mon Sep 17 00:00:00 2001 From: rajku-dev Date: Sun, 19 Jan 2025 07:10:52 +0530 Subject: [PATCH] Fix FileUploadDialog overflow | Use ShadCN component --- src/components/Files/FilesTab.tsx | 47 +++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/src/components/Files/FilesTab.tsx b/src/components/Files/FilesTab.tsx index fadb4358883..02acdd457e2 100644 --- a/src/components/Files/FilesTab.tsx +++ b/src/components/Files/FilesTab.tsx @@ -19,6 +19,8 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; import { Progress } from "@/components/ui/progress"; import { Table, @@ -38,7 +40,6 @@ import { import AudioPlayer from "@/components/Common/AudioPlayer"; import Loading from "@/components/Common/Loading"; -import TextFormField from "@/components/Form/FormFields/TextFormField"; import { FileUploadModel } from "@/components/Patient/models"; import useFileManager from "@/hooks/useFileManager"; @@ -576,7 +577,7 @@ const FileUploadDialog = ({ aria-labelledby="file-upload-dialog" > @@ -601,19 +602,35 @@ const FileUploadDialog = ({ - fileUpload.setFileName(e.value, index)} - error={ - index === 0 && fileUpload.error ? fileUpload.error : undefined - } - /> +
+ + + fileUpload.setFileName(e.target.value, index) + } + /> + {index === 0 && fileUpload.error && ( +

+ {fileUpload.error} +

+ )} +
))}