@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.js
CHANGED
|
@@ -59969,7 +59969,41 @@ var DashboardStageInner = function DashboardStageInner(_ref3) {
|
|
|
59969
59969
|
pageRefsMap.current[pageId] = {
|
|
59970
59970
|
current: updatedWorkspace
|
|
59971
59971
|
};
|
|
59972
|
-
|
|
59972
|
+
|
|
59973
|
+
// Also update the React state so workspaceSelected (which the
|
|
59974
|
+
// dashboard config bulk-edit modal reads) stays in sync. Before
|
|
59975
|
+
// this, page-level edits only flowed into pageRefsMap and the
|
|
59976
|
+
// bulk modal kept rendering pre-edit data — even when the
|
|
59977
|
+
// PanelEditItemProviders fix correctly wrote both layers and
|
|
59978
|
+
// the LayoutBuilder fix correctly propagated up. The data
|
|
59979
|
+
// arrived; it just never reached the React state the bulk
|
|
59980
|
+
// modal subscribes to.
|
|
59981
|
+
//
|
|
59982
|
+
// Mirror the new page's `layout` into the active tab's matching
|
|
59983
|
+
// page, AND bring forward the workspace-level
|
|
59984
|
+
// `selectedProviders` map so layer-2 writes from per-widget
|
|
59985
|
+
// edits land in state the bulk modal can see.
|
|
59986
|
+
if (!activeTabId || !updatedWorkspace) return;
|
|
59987
|
+
setOpenTabs(function (prev) {
|
|
59988
|
+
return prev.map(function (tab) {
|
|
59989
|
+
var _updatedWorkspace$sel;
|
|
59990
|
+
if (tab.id !== activeTabId) return tab;
|
|
59991
|
+
var tabWs = tab.workspace;
|
|
59992
|
+
if (!tabWs) return tab;
|
|
59993
|
+
var nextPages = Array.isArray(tabWs.pages) ? tabWs.pages.map(function (p) {
|
|
59994
|
+
return p && p.id === pageId ? _objectSpread$6(_objectSpread$6({}, p), {}, {
|
|
59995
|
+
layout: updatedWorkspace.layout
|
|
59996
|
+
}) : p;
|
|
59997
|
+
}) : tabWs.pages;
|
|
59998
|
+
return _objectSpread$6(_objectSpread$6({}, tab), {}, {
|
|
59999
|
+
workspace: _objectSpread$6(_objectSpread$6({}, tabWs), {}, {
|
|
60000
|
+
pages: nextPages,
|
|
60001
|
+
selectedProviders: (_updatedWorkspace$sel = updatedWorkspace.selectedProviders) !== null && _updatedWorkspace$sel !== void 0 ? _updatedWorkspace$sel : tabWs.selectedProviders
|
|
60002
|
+
})
|
|
60003
|
+
});
|
|
60004
|
+
});
|
|
60005
|
+
});
|
|
60006
|
+
}, [activeTabId]);
|
|
59973
60007
|
|
|
59974
60008
|
// Keep stable callback refs current
|
|
59975
60009
|
stableProviderSelectRef.current = handleProviderSelect;
|