@refinedev/core 5.0.3 → 5.0.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": "@refinedev/core",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "private": false,
5
5
  "description": "Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.",
6
6
  "repository": {
@@ -250,7 +250,8 @@ export const useInfiniteList = <
250
250
  queryFn: (context) => {
251
251
  const paginationProperties = {
252
252
  ...prefferedPagination,
253
- currentPage: context.pageParam,
253
+ currentPage:
254
+ (context.pageParam as number) ?? prefferedPagination.currentPage,
254
255
  };
255
256
 
256
257
  const meta = {
@@ -260,7 +261,7 @@ export const useInfiniteList = <
260
261
 
261
262
  return getList<TQueryFnData>({
262
263
  resource: resource?.name || "",
263
- pagination: prefferedPagination,
264
+ pagination: paginationProperties,
264
265
  filters: prefferedFilters,
265
266
  sorters: prefferedSorters,
266
267
  meta,
@@ -345,8 +346,6 @@ export const useInfiniteList = <
345
346
  isLoading: queryResponse.isFetching,
346
347
  });
347
348
 
348
- queryResponse.data?.pages;
349
-
350
349
  return {
351
350
  query: queryResponse,
352
351
  result: {
@@ -159,8 +159,10 @@ export const useForm = <
159
159
  id,
160
160
  queryOptions: {
161
161
  // Only enable the query if it's not a create action and the `id` is defined
162
- enabled: !isCreate && id !== undefined,
163
162
  ...props.queryOptions,
163
+ // AND the external enabled condition (if provided) is also true
164
+ enabled:
165
+ !isCreate && id !== undefined && (props.queryOptions?.enabled ?? true),
164
166
  },
165
167
  liveMode: props.liveMode,
166
168
  onLiveEvent: props.onLiveEvent,