@trops/dash-core 0.1.468 → 0.1.469
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.
- package/dist/index.esm.js +35 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +35 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -59951,7 +59951,41 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
|
|
|
59951
59951
|
pageRefsMap.current[pageId] = {
|
|
59952
59952
|
current: updatedWorkspace
|
|
59953
59953
|
};
|
|
59954
|
-
|
|
59954
|
+
|
|
59955
|
+
// Also update the React state so workspaceSelected (which the
|
|
59956
|
+
// dashboard config bulk-edit modal reads) stays in sync. Before
|
|
59957
|
+
// this, page-level edits only flowed into pageRefsMap and the
|
|
59958
|
+
// bulk modal kept rendering pre-edit data — even when the
|
|
59959
|
+
// PanelEditItemProviders fix correctly wrote both layers and
|
|
59960
|
+
// the LayoutBuilder fix correctly propagated up. The data
|
|
59961
|
+
// arrived; it just never reached the React state the bulk
|
|
59962
|
+
// modal subscribes to.
|
|
59963
|
+
//
|
|
59964
|
+
// Mirror the new page's `layout` into the active tab's matching
|
|
59965
|
+
// page, AND bring forward the workspace-level
|
|
59966
|
+
// `selectedProviders` map so layer-2 writes from per-widget
|
|
59967
|
+
// edits land in state the bulk modal can see.
|
|
59968
|
+
if (!activeTabId || !updatedWorkspace) return;
|
|
59969
|
+
setOpenTabs(function (prev) {
|
|
59970
|
+
return prev.map(function (tab) {
|
|
59971
|
+
var _updatedWorkspace$sel;
|
|
59972
|
+
if (tab.id !== activeTabId) return tab;
|
|
59973
|
+
var tabWs = tab.workspace;
|
|
59974
|
+
if (!tabWs) return tab;
|
|
59975
|
+
var nextPages = Array.isArray(tabWs.pages) ? tabWs.pages.map(function (p) {
|
|
59976
|
+
return p && p.id === pageId ? _objectSpread$6(_objectSpread$6({}, p), {}, {
|
|
59977
|
+
layout: updatedWorkspace.layout
|
|
59978
|
+
}) : p;
|
|
59979
|
+
}) : tabWs.pages;
|
|
59980
|
+
return _objectSpread$6(_objectSpread$6({}, tab), {}, {
|
|
59981
|
+
workspace: _objectSpread$6(_objectSpread$6({}, tabWs), {}, {
|
|
59982
|
+
pages: nextPages,
|
|
59983
|
+
selectedProviders: (_updatedWorkspace$sel = updatedWorkspace.selectedProviders) !== null && _updatedWorkspace$sel !== void 0 ? _updatedWorkspace$sel : tabWs.selectedProviders
|
|
59984
|
+
})
|
|
59985
|
+
});
|
|
59986
|
+
});
|
|
59987
|
+
});
|
|
59988
|
+
}, [activeTabId]);
|
|
59955
59989
|
|
|
59956
59990
|
// Keep stable callback refs current
|
|
59957
59991
|
stableProviderSelectRef.current = handleProviderSelect;
|