@timeax/form-palette 0.1.30 → 0.1.32

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/extra.d.mts CHANGED
@@ -235,6 +235,7 @@ type UseDataResult<TItem = any, TFilters = Record<string, any>> = {
235
235
  id?: string;
236
236
  data: TItem[];
237
237
  visible: TItem[];
238
+ res?: any;
238
239
  loading: boolean;
239
240
  error: any;
240
241
  query: string;
package/dist/extra.d.ts CHANGED
@@ -235,6 +235,7 @@ type UseDataResult<TItem = any, TFilters = Record<string, any>> = {
235
235
  id?: string;
236
236
  data: TItem[];
237
237
  visible: TItem[];
238
+ res?: any;
238
239
  loading: boolean;
239
240
  error: any;
240
241
  query: string;
package/dist/extra.js CHANGED
@@ -33964,6 +33964,7 @@ function useData(opts, deps = []) {
33964
33964
  var _a2;
33965
33965
  return (_a2 = opts.initial) != null ? _a2 : [];
33966
33966
  });
33967
+ const [res, setRes] = React74__namespace.useState();
33967
33968
  const [loading, setLoading] = React74__namespace.useState(false);
33968
33969
  const [error, setError] = React74__namespace.useState(void 0);
33969
33970
  const dataRef = React74__namespace.useRef(data);
@@ -34092,6 +34093,7 @@ function useData(opts, deps = []) {
34092
34093
  (prev) => prev.filter((x2) => nextIds.has(x2))
34093
34094
  );
34094
34095
  }
34096
+ setRes(resBody);
34095
34097
  setData(list);
34096
34098
  setLoading(false);
34097
34099
  return list;
@@ -34246,7 +34248,7 @@ function useData(opts, deps = []) {
34246
34248
  (idOrIds) => {
34247
34249
  if (selectionMode === "none") return;
34248
34250
  const ids = normalizeIds(idOrIds).filter(isKey);
34249
- if (!ids.length) return;
34251
+ if (!ids.length) return clearSelection();
34250
34252
  for (const id of ids) {
34251
34253
  const hit = dataById.get(id);
34252
34254
  if (hit) selectedCacheRef.current.set(id, hit);
@@ -34255,11 +34257,7 @@ function useData(opts, deps = []) {
34255
34257
  setSelectedIdsArr([ids[0]]);
34256
34258
  return;
34257
34259
  }
34258
- setSelectedIdsArr((prev) => {
34259
- const set = new Set(prev);
34260
- for (const id of ids) set.add(id);
34261
- return Array.from(set);
34262
- });
34260
+ setSelectedIdsArr(ids);
34263
34261
  },
34264
34262
  [dataById, normalizeIds, selectionMode]
34265
34263
  );
@@ -34323,6 +34321,7 @@ function useData(opts, deps = []) {
34323
34321
  id: opts.id,
34324
34322
  data,
34325
34323
  visible,
34324
+ res,
34326
34325
  loading,
34327
34326
  error,
34328
34327
  query,