Skip to content

Commit 9024f3f

Browse files
2 parents 7243dc2 + 6c08ca9 commit 9024f3f

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

App/frontend-app/src/assets/scss/global.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

App/frontend-app/src/components/documentViewer/dialogContentComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 && (

App/frontend-app/src/components/uploadButton/uploadButton.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff 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>

0 commit comments

Comments
 (0)