@gisce/react-ooui 1.1.3 → 1.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "files": [
5
5
  "dist",
6
6
  "src",
@@ -165,7 +165,7 @@ export const useSearch = (opts: UseSearchOpts) => {
165
165
  ]);
166
166
 
167
167
  const searchResults = useCallback(
168
- async (opts?: { params: any; newOffset: number }) => {
168
+ async (opts?: { params: any; newOffset?: number }) => {
169
169
  const { params, newOffset } = opts || {};
170
170
 
171
171
  const mergedParams = mergeParams(params || searchParams, domain);
@@ -236,7 +236,7 @@ export const useSearch = (opts: UseSearchOpts) => {
236
236
  );
237
237
 
238
238
  const fetchResults = useCallback(
239
- async (opts?: { params: any; newOffset: number }) => {
239
+ async (opts?: { params: any; newOffset?: number }) => {
240
240
  try {
241
241
  setTableRefreshing(true);
242
242
  setTreeIsLoading?.(true);
@@ -310,8 +310,11 @@ export const useSearch = (opts: UseSearchOpts) => {
310
310
  setSearchFilterLoading(true);
311
311
  setSearchError(undefined);
312
312
  setPage(1);
313
- internalLimit.current = newLimit;
314
- if (newLimit) setLimit?.(newLimit);
313
+
314
+ if (newLimit) {
315
+ internalLimit.current = newLimit;
316
+ setLimit?.(newLimit);
317
+ }
315
318
  if (newOffset) setOffset(newOffset);
316
319
  fetchResults({
317
320
  params,