@m4l/layouts 0.0.20 → 0.0.21

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.
@@ -137,21 +137,24 @@ function MasterDetailLayout(props) {
137
137
  return actions;
138
138
  }, [splitActions, moduleActions, isDesktop, viewDetailAction]);
139
139
  const finalComponentsDictionary = useMemo(() => componentsDictionary.concat(getMasterDetailLayoutComponentsDictionary()), [componentsDictionary]);
140
- return /* @__PURE__ */ jsx(MasterDetailProvider, {
141
- children: /* @__PURE__ */ jsx(ModuleLayout, {
142
- ref: moduleLayoutRef,
143
- moduleId,
144
- moduleNameField,
145
- urlIcon,
146
- moduleActions: finalModuleActions,
147
- privileges,
148
- componentsDictionary: finalComponentsDictionary,
149
- breadcrumbLinks,
150
- children: /* @__PURE__ */ jsx(SplitLayout, {
151
- splitPosition: isDesktop ? splitPosition : "none",
152
- firstPart: masterComponent,
153
- secondPart: detailComponent
154
- })
140
+ const memonizedSplit = useMemo(() => {
141
+ return /* @__PURE__ */ jsx(SplitLayout, {
142
+ splitPosition: isDesktop ? splitPosition : "none",
143
+ firstPart: masterComponent,
144
+ secondPart: detailComponent
145
+ });
146
+ }, [isDesktop, splitPosition, masterComponent, detailComponent]);
147
+ return /* @__PURE__ */ jsx(ModuleLayout, {
148
+ ref: moduleLayoutRef,
149
+ moduleId,
150
+ moduleNameField,
151
+ urlIcon,
152
+ moduleActions: finalModuleActions,
153
+ privileges,
154
+ componentsDictionary: finalComponentsDictionary,
155
+ breadcrumbLinks,
156
+ children: /* @__PURE__ */ jsx(MasterDetailProvider, {
157
+ children: memonizedSplit
155
158
  })
156
159
  });
157
160
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
3
  "private": false,
4
- "version": "0.0.20",
4
+ "version": "0.0.21",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
7
7
  "dev": "vite",