Skip to content

Commit

Permalink
feat: Use onExited to reset the dataset iri
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbrowne committed May 29, 2024
1 parent 958e65f commit 4c43c46
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/configurator/components/add-new-dataset-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ export const AddNewDatasetPanel = () => {

const handleClose = useEventCallback(() => {
close();
setTimeout(() => {
// Give time to the drawer to close before resetting the dataset IRI
setDataSetIri("");
}, 500);
});

const handleExited = useEventCallback(() => {
setDataSetIri("");
});

return (
Expand All @@ -92,6 +92,9 @@ export const AddNewDatasetPanel = () => {
open={isOpen}
variant="temporary"
onClose={handleClose}
SlideProps={{
onExited: handleExited,
}}
PaperProps={{
sx: {
width: "1400px",
Expand Down

0 comments on commit 4c43c46

Please sign in to comment.