@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/dist/hooks/useSearch.d.ts +1 -1
- package/dist/hooks/useSearch.d.ts.map +1 -1
- package/dist/react-ooui.es.js +1 -1
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +1 -1
- package/dist/react-ooui.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useSearch.ts +7 -4
package/package.json
CHANGED
package/src/hooks/useSearch.ts
CHANGED
|
@@ -165,7 +165,7 @@ export const useSearch = (opts: UseSearchOpts) => {
|
|
|
165
165
|
]);
|
|
166
166
|
|
|
167
167
|
const searchResults = useCallback(
|
|
168
|
-
async (opts?: { params: any; newOffset
|
|
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
|
|
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
|
-
|
|
314
|
-
if (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,
|