Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Austenem/CAT-933 fix helper panel dialogs #3554

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-fix-helper-panel-dialogs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix bug on dataset detail page for workspace dialogs opened in succession for different processed datasets.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ function AddDatasetsFromDetailDialog({ uuid, dialogType }: AddDatasetsFromDetail
}

return (
// We're populating the table provider with the dataset from the detail page so as not to duplicate logic from the search dialog
<SelectableTableProvider tableLabel="Add Datasets From Detail Dialog" selectedRows={new Set([uuid])}>
<SelectableTableProvider key={uuid} tableLabel="Add Datasets From Detail Dialog" selectedRows={new Set([uuid])}>
<AddDatasetsFromSearchDialog />
</SelectableTableProvider>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ function useCreateWorkspaceForm({
if (initialProtectedDatasets && initialProtectedDatasets !== '') {
setValue('protected-datasets', initialProtectedDatasets);
}
}, [initialProtectedDatasets, setValue]);
// Necessary to update dialog state between different processed datasets on detail pages
if (initialSelectedDatasets && initialSelectedDatasets.length !== 0) {
setValue('datasets', initialSelectedDatasets);
setValue('workspace-name', checkedWorkspaceName);
}
}, [initialProtectedDatasets, initialSelectedDatasets, checkedWorkspaceName, setValue]);

useEffect(() => {
if (dialogIsOpen) {
Expand Down
Loading