@timeax/form-palette 0.1.31 → 0.1.33
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 +1 -1
- package/dist/extra.d.ts +1 -1
- package/dist/extra.js +3 -7
- package/dist/extra.js.map +1 -1
- package/dist/extra.mjs +3 -7
- package/dist/extra.mjs.map +1 -1
- package/package.json +1 -1
package/dist/extra.d.mts
CHANGED
|
@@ -257,7 +257,7 @@ type UseDataResult<TItem = any, TFilters = Record<string, any>> = {
|
|
|
257
257
|
clearSelection: () => void;
|
|
258
258
|
isSelected: (id: DataKey) => boolean;
|
|
259
259
|
getSelection: () => TItem | TItem[] | null;
|
|
260
|
-
refresh: () =>
|
|
260
|
+
refresh: () => Promise<TItem[]>;
|
|
261
261
|
override(data: TItem[]): void;
|
|
262
262
|
fetch: (override?: {
|
|
263
263
|
query?: string;
|
package/dist/extra.d.ts
CHANGED
|
@@ -257,7 +257,7 @@ type UseDataResult<TItem = any, TFilters = Record<string, any>> = {
|
|
|
257
257
|
clearSelection: () => void;
|
|
258
258
|
isSelected: (id: DataKey) => boolean;
|
|
259
259
|
getSelection: () => TItem | TItem[] | null;
|
|
260
|
-
refresh: () =>
|
|
260
|
+
refresh: () => Promise<TItem[]>;
|
|
261
261
|
override(data: TItem[]): void;
|
|
262
262
|
fetch: (override?: {
|
|
263
263
|
query?: string;
|
package/dist/extra.js
CHANGED
|
@@ -34128,8 +34128,8 @@ function useData(opts, deps = []) {
|
|
|
34128
34128
|
getItemKey
|
|
34129
34129
|
]
|
|
34130
34130
|
);
|
|
34131
|
-
const refresh = React74__namespace.useCallback(() => {
|
|
34132
|
-
|
|
34131
|
+
const refresh = React74__namespace.useCallback(async () => {
|
|
34132
|
+
return fetchImpl();
|
|
34133
34133
|
}, [fetchImpl]);
|
|
34134
34134
|
const override = React74__namespace.useCallback((newData) => {
|
|
34135
34135
|
setData(newData);
|
|
@@ -34257,11 +34257,7 @@ function useData(opts, deps = []) {
|
|
|
34257
34257
|
setSelectedIdsArr([ids[0]]);
|
|
34258
34258
|
return;
|
|
34259
34259
|
}
|
|
34260
|
-
setSelectedIdsArr(
|
|
34261
|
-
const set = new Set(prev);
|
|
34262
|
-
for (const id of ids) set.add(id);
|
|
34263
|
-
return Array.from(set);
|
|
34264
|
-
});
|
|
34260
|
+
setSelectedIdsArr(ids);
|
|
34265
34261
|
},
|
|
34266
34262
|
[dataById, normalizeIds, selectionMode]
|
|
34267
34263
|
);
|