@base-stone/hooks 1.0.9 → 1.1.2
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/design-hooks.es.prod.js +13 -7
- package/package.json +1 -1
|
@@ -223,7 +223,9 @@ function le({ queryFn: s, params: t, dataKey: o, fieldNames: e }) {
|
|
|
223
223
|
} else
|
|
224
224
|
n((g) => ({ ...g, options: v }));
|
|
225
225
|
u(!1);
|
|
226
|
-
}, a = M(
|
|
226
|
+
}, a = M(() => {
|
|
227
|
+
c();
|
|
228
|
+
});
|
|
227
229
|
z(() => {
|
|
228
230
|
c();
|
|
229
231
|
}, []);
|
|
@@ -257,17 +259,21 @@ function de({
|
|
|
257
259
|
dataKey: e,
|
|
258
260
|
initialValue: r
|
|
259
261
|
}) {
|
|
260
|
-
const n = r || (o === "Array" ? [] : /* @__PURE__ */ Object.create({})), [p, u] = S(n), [c, a] = S(!1), l = b(t), f = async (
|
|
262
|
+
const n = r || (o === "Array" ? [] : /* @__PURE__ */ Object.create({})), [p, u] = S(n), [c, a] = S(!1), l = b(t), f = async (v) => {
|
|
261
263
|
a(!0);
|
|
262
|
-
const
|
|
263
|
-
u(
|
|
264
|
+
const g = await s(v ?? t);
|
|
265
|
+
u(g.data);
|
|
264
266
|
};
|
|
265
|
-
|
|
267
|
+
z(() => {
|
|
266
268
|
f(l.current);
|
|
267
|
-
}, [])
|
|
269
|
+
}, []);
|
|
270
|
+
const i = M(() => {
|
|
271
|
+
f();
|
|
272
|
+
});
|
|
273
|
+
return {
|
|
268
274
|
[e]: p,
|
|
269
275
|
loading: c,
|
|
270
|
-
refresh:
|
|
276
|
+
refresh: i
|
|
271
277
|
};
|
|
272
278
|
}
|
|
273
279
|
export {
|