diff --git a/src/components/TreeSelect/__stories__/TreeSelect.stories.tsx b/src/components/TreeSelect/__stories__/TreeSelect.stories.tsx index bb234c8158..a855b09b15 100644 --- a/src/components/TreeSelect/__stories__/TreeSelect.stories.tsx +++ b/src/components/TreeSelect/__stories__/TreeSelect.stories.tsx @@ -84,6 +84,7 @@ const WithGroupSelectionControlledStateAndCustomIconsExample: StoryFn< onClick={(e) => { e.stopPropagation(); setExpanded((prevExpandedState) => ({ + ...prevExpandedState, // by default all groups expanded [id]: id in prevExpandedState ? !prevExpandedState[id] : false, }));