Skip to content

Commit 1919e23

Browse files
committed
#875 Update app metadata on importing work from gallery
1 parent 32c1057 commit 1919e23

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/page-header/open-actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default function OpenActions() {
6464
// details panel will complain about unknown nodes or edges if the last selected is not cleared
6565
dispatch(clearSelected());
6666

67-
// rest graph with new data
67+
// reset graph with new data
6868
graph.current.clear();
6969
graph.current.import(save.graph);
7070

src/components/page-header/rmp-gallery-app-clip.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function RmpGalleryAppClip(props: RmpGalleryAppClipProps) {
5757
// details panel will complain about unknown nodes or edges if the last selected is not cleared
5858
dispatch(clearSelected());
5959

60-
// rest graph with new data
60+
// reset graph with new data
6161
graph.current.clear();
6262
graph.current.import(save.graph);
6363

@@ -124,6 +124,8 @@ export default function RmpGalleryAppClip(props: RmpGalleryAppClipProps) {
124124
let host: string | undefined = undefined;
125125
if (firstDotIndex !== -1) host = params.substring(firstDotIndex + 1);
126126
fetchAndApplyTemplate(id, host);
127+
// clear the search params in rmt, otherwise it will be preserved and re-imported every time
128+
rmgRuntime.updateAppMetadata({});
127129
}
128130
}, []);
129131

0 commit comments

Comments
 (0)