Skip to content

Commit 7fc9988

Browse files
committed
JSON needs to be converted to string
1 parent fb19170 commit 7fc9988

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

frontend/src/components/navigation/FileSystemSelector.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ const FileSystemSelector: React.FC<{
305305
showOnlyDatasetFiles: boolean;
306306
selectFolder: boolean;
307307
datasetId: string | undefined;
308-
onChange: (SelectionDetails: SelectionDetails) => void;
308+
onChange: (SelectionDetails: string) => void;
309309
}> = ({ showOnlyDatasetFiles, selectFolder, datasetId, onChange }) => {
310310
const [open, setOpen] = useState(false);
311311
const [selection, setSelection] = useState<SelectionDetails>({
@@ -350,12 +350,15 @@ const FileSystemSelector: React.FC<{
350350
const handleConfirmSelection = () => {
351351
if (highlightedSelection.selectionID) {
352352
setSelection(highlightedSelection);
353-
onChange({
353+
const selection = {
354354
selectionID: highlightedSelection.selectionID,
355355
selectionName: highlightedSelection.selectionName,
356356
datasetId: highlightedSelection.datasetId,
357357
selectionType: highlightedSelection.selectionType,
358-
});
358+
}
359+
// Convert to string
360+
const selectionString = JSON.stringify(selection);
361+
onChange(selectionString);
359362
handleClose();
360363
}
361364
};

0 commit comments

Comments
 (0)