@etsoo/materialui 1.5.38 → 1.5.39
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.
|
@@ -55,13 +55,15 @@ function CommonPage(props) {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
: undefined, [onUpdateAll, onUpdate, onRefresh]);
|
|
58
|
+
const stateDetector = react_1.default.useMemo(() => update && app?.stateDetector({ targetFields, update }), [update, targetFields]);
|
|
58
59
|
react_1.default.useEffect(() => {
|
|
59
60
|
if (updateRef.current && update) {
|
|
60
61
|
update(true, []);
|
|
62
|
+
updateRef.current = false;
|
|
61
63
|
}
|
|
62
64
|
}, [update]);
|
|
63
65
|
// Return the UI
|
|
64
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [
|
|
66
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [stateDetector, (0, jsx_runtime_1.jsxs)(Container_1.default, { disableGutters: disableGutters, maxWidth: maxWidth, sx: sx, id: "page-container", ...rest, children: [(0, jsx_runtime_1.jsxs)(FabBox_1.FabBox, { sx: {
|
|
65
67
|
zIndex: 1,
|
|
66
68
|
...(typeof fabTop === "function"
|
|
67
69
|
? fabTop(theme, fabPadding)
|
|
@@ -49,13 +49,15 @@ export function CommonPage(props) {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
: undefined, [onUpdateAll, onUpdate, onRefresh]);
|
|
52
|
+
const stateDetector = React.useMemo(() => update && app?.stateDetector({ targetFields, update }), [update, targetFields]);
|
|
52
53
|
React.useEffect(() => {
|
|
53
54
|
if (updateRef.current && update) {
|
|
54
55
|
update(true, []);
|
|
56
|
+
updateRef.current = false;
|
|
55
57
|
}
|
|
56
58
|
}, [update]);
|
|
57
59
|
// Return the UI
|
|
58
|
-
return (_jsxs(React.Fragment, { children: [
|
|
60
|
+
return (_jsxs(React.Fragment, { children: [stateDetector, _jsxs(Container, { disableGutters: disableGutters, maxWidth: maxWidth, sx: sx, id: "page-container", ...rest, children: [_jsxs(FabBox, { sx: {
|
|
59
61
|
zIndex: 1,
|
|
60
62
|
...(typeof fabTop === "function"
|
|
61
63
|
? fabTop(theme, fabPadding)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.39",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@dnd-kit/sortable": "^10.0.0",
|
|
41
41
|
"@emotion/react": "^11.14.0",
|
|
42
42
|
"@emotion/styled": "^11.14.0",
|
|
43
|
-
"@etsoo/appscript": "^1.6.
|
|
43
|
+
"@etsoo/appscript": "^1.6.32",
|
|
44
44
|
"@etsoo/notificationbase": "^1.1.60",
|
|
45
45
|
"@etsoo/react": "^1.8.40",
|
|
46
46
|
"@etsoo/shared": "^1.2.70",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@types/pulltorefreshjs": "^0.1.7",
|
|
79
79
|
"@types/react": "^18.3.20",
|
|
80
80
|
"@types/react-avatar-editor": "^13.0.4",
|
|
81
|
-
"@types/react-dom": "^18.3.
|
|
81
|
+
"@types/react-dom": "^18.3.7",
|
|
82
82
|
"@types/react-input-mask": "^3.0.6",
|
|
83
83
|
"@types/react-window": "^1.8.8",
|
|
84
84
|
"@vitejs/plugin-react": "^4.4.1",
|
package/src/pages/CommonPage.tsx
CHANGED
|
@@ -168,16 +168,22 @@ export function CommonPage(props: CommonPageProps) {
|
|
|
168
168
|
[onUpdateAll, onUpdate, onRefresh]
|
|
169
169
|
);
|
|
170
170
|
|
|
171
|
+
const stateDetector = React.useMemo(
|
|
172
|
+
() => update && app?.stateDetector({ targetFields, update }),
|
|
173
|
+
[update, targetFields]
|
|
174
|
+
);
|
|
175
|
+
|
|
171
176
|
React.useEffect(() => {
|
|
172
177
|
if (updateRef.current && update) {
|
|
173
178
|
update(true, []);
|
|
179
|
+
updateRef.current = false;
|
|
174
180
|
}
|
|
175
181
|
}, [update]);
|
|
176
182
|
|
|
177
183
|
// Return the UI
|
|
178
184
|
return (
|
|
179
185
|
<React.Fragment>
|
|
180
|
-
{
|
|
186
|
+
{stateDetector}
|
|
181
187
|
<Container
|
|
182
188
|
disableGutters={disableGutters}
|
|
183
189
|
maxWidth={maxWidth}
|