Skip to content

Commit de5b7a0

Browse files
committed
1 fix: update glossaries immutably in updateActiveGlossary
2 3 In-place mutation (`glossaries[index] = updatedGlossary`) preserved the array 4 reference, so GlossaryLeftPanel's memoized menu items never recomputed after a 5 displayName-only edit. Mirror the existing updateGlossary pattern by creating a 6 new array reference via map so downstream memos observe the change. 7 8 Fixes #32674
1 parent 9fe0f21 commit de5b7a0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

openmetadata-ui/src/main/resources/ui/src/components/Glossary/useGlossary.store.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ export const useGlossaryStore = create<{
8484
);
8585

8686
if (index !== -1) {
87-
glossaries[index] = updatedGlossary;
87+
set({
88+
glossaries: glossaries.map((g, i) => (i === index ? updatedGlossary : g)),
89+
});
8890
}
8991
},
9092
insertNewGlossaryTermToChildTerms: (glossary: GlossaryTerm) => {

0 commit comments

Comments
 (0)