File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -104,4 +104,8 @@ $max-content-width: 1600px;
104104 ._max-content-width {
105105 max-width : $max-content-width ;
106106 }
107+ }
108+
109+ .autoHeight {
110+ height :auto !important ;
107111}
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export function DialogContentComponent({
5252 </ div >
5353 ) }
5454
55- < div className = "mb-4 h-96 overflow-y-auto" >
55+ < div className = "mb-4 h-96 overflow-y-auto autoHeight " >
5656 { allChunkTexts . map (
5757 ( item , index ) =>
5858 item && (
Original file line number Diff line number Diff line change @@ -93,9 +93,22 @@ const UploadDocumentsDialog = () => {
9393 noKeyboard : true ,
9494 } ) ;
9595
96+ // Add this function to handle dialog close
97+ const handleDialogClose = ( ) => {
98+ setIsOpen ( false ) ;
99+ setUploadingFiles ( [ ] ) ; // Clear the uploaded files
100+ setIsUploading ( false ) ; // Reset uploading state
101+ } ;
102+
96103 return ( < >
97104 { isUploadBtnVisible == true ?
98- < Dialog open = { isOpen } onOpenChange = { ( event , data ) => setIsOpen ( data . open ) } >
105+ < Dialog open = { isOpen } onOpenChange = { ( event , data ) => {
106+ if ( ! data . open ) {
107+ handleDialogClose ( ) ;
108+ } else {
109+ setIsOpen ( data . open ) ;
110+ }
111+ } } >
99112 < DialogTrigger >
100113 < Button icon = { < ArrowUpload24Regular /> } onClick = { ( ) => setIsOpen ( true ) } >
101114 Upload documents
@@ -108,7 +121,7 @@ const UploadDocumentsDialog = () => {
108121 < Button
109122 icon = { < DismissRegular /> }
110123 appearance = "subtle"
111- onClick = { ( ) => setIsOpen ( false ) }
124+ onClick = { handleDialogClose }
112125 style = { { position : "absolute" , right : 20 , top : 20 } }
113126 />
114127 </ DialogTitle >
You can’t perform that action at this time.
0 commit comments