orcs-design-system 3.3.10 → 3.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,12 +14,10 @@ const FloatingPanels = _ref => {
|
|
|
14
14
|
onClick = () => {}
|
|
15
15
|
} = _ref;
|
|
16
16
|
const [expandedPanelId, setExpandedPanelId] = useState(null);
|
|
17
|
-
|
|
18
|
-
// Set the default expanded panel on component mount
|
|
19
17
|
useEffect(() => {
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
setExpandedPanelId(
|
|
18
|
+
const expandedPanel = panels.find(panel => panel.expanded);
|
|
19
|
+
if (expandedPanel?.id) {
|
|
20
|
+
setExpandedPanelId(expandedPanel.id);
|
|
23
21
|
}
|
|
24
22
|
}, [panels]);
|
|
25
23
|
const togglePanel = panelId => {
|