react-admin-base-bootstrap 0.9.26 → 0.9.27
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.
|
@@ -106,12 +106,12 @@ export default function BootstrapTable({ url, bordered, noStrip, defaultParams,
|
|
|
106
106
|
}, [defaultParams, ref, setParams]);
|
|
107
107
|
useEffect(function () {
|
|
108
108
|
if (innerRef) {
|
|
109
|
-
innerRef.current =
|
|
109
|
+
innerRef.current = update;
|
|
110
110
|
return function () {
|
|
111
111
|
innerRef.current = null;
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
}, [
|
|
114
|
+
}, [update, innerRef]);
|
|
115
115
|
const fetchData = useCallback(function (extraParams) {
|
|
116
116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
117
117
|
if (body) {
|
|
@@ -120,9 +120,8 @@ export default function CRUD(props) {
|
|
|
120
120
|
const { url, apiUrl, Component, defaultParams, noAdd } = props;
|
|
121
121
|
const reload = useCallback(function () {
|
|
122
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
123
|
+
var _a;
|
|
124
|
+
yield ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.call(ref));
|
|
126
125
|
});
|
|
127
126
|
}, [ref]);
|
|
128
127
|
return React.createElement(UrlContext.Provider, { value: url },
|
package/package.json
CHANGED
|
@@ -142,13 +142,13 @@ export default function BootstrapTable({url, bordered, noStrip, defaultParams, a
|
|
|
142
142
|
|
|
143
143
|
useEffect(function () {
|
|
144
144
|
if (innerRef) {
|
|
145
|
-
innerRef.current =
|
|
145
|
+
innerRef.current = update;
|
|
146
146
|
|
|
147
147
|
return function () {
|
|
148
148
|
innerRef.current = null;
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
}, [
|
|
151
|
+
}, [update, innerRef]);
|
|
152
152
|
|
|
153
153
|
const fetchData = useCallback(async function(extraParams) {
|
|
154
154
|
if (body) {
|
package/src/Components/CRUD.tsx
CHANGED
|
@@ -144,9 +144,7 @@ export default function CRUD(props: CRUDProps) {
|
|
|
144
144
|
const { url, apiUrl, Component, defaultParams, noAdd } = props;
|
|
145
145
|
|
|
146
146
|
const reload = useCallback(async function() {
|
|
147
|
-
|
|
148
|
-
ref.current({});
|
|
149
|
-
}
|
|
147
|
+
await ref.current?.();
|
|
150
148
|
}, [ref]);
|
|
151
149
|
|
|
152
150
|
return <UrlContext.Provider value={url}>
|