@refinedev/core 4.44.7 → 4.44.8

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": "4.44.7",
3
+ "version": "4.44.8",
4
4
  "description": "refine is a React-based framework for building internal tools, rapidly. It ships with Ant Design System, an enterprise-level UI toolkit.",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -142,7 +142,7 @@ export const useList = <
142
142
  liveParams,
143
143
  dataProviderName,
144
144
  overtimeOptions,
145
- }: UseListProps<TQueryFnData, TError, TData>): QueryObserverResult<
145
+ }: UseListProps<TQueryFnData, TError, TData> = {}): QueryObserverResult<
146
146
  GetListResponse<TData>,
147
147
  TError
148
148
  > &
@@ -38,15 +38,15 @@ export type UseSelectProps<TQueryFnData, TError, TData> = {
38
38
  * Set the option's value
39
39
  * @default `"title"`
40
40
  */
41
- optionLabel?: keyof TQueryFnData extends string
42
- ? keyof TQueryFnData
41
+ optionLabel?: keyof TData extends string
42
+ ? keyof TData
43
43
  : never;
44
44
  /**
45
45
  * Set the option's label value
46
46
  * @default `"id"`
47
47
  */
48
- optionValue?: keyof TQueryFnData extends string
49
- ? keyof TQueryFnData
48
+ optionValue?: keyof TData extends string
49
+ ? keyof TData
50
50
  : never;
51
51
  /**
52
52
  * Allow us to sort the options
@@ -214,8 +214,8 @@ export const useSelect = <
214
214
  (data: GetManyResponse<TData>) => {
215
215
  setSelectedOptions(
216
216
  data.data.map((item) => ({
217
- label: get(item, optionLabel) as string,
218
- value: get(item, optionValue) as string,
217
+ label: String(get(item, optionLabel)),
218
+ value: String(get(item, optionValue)),
219
219
  })),
220
220
  );
221
221
  },
@@ -249,8 +249,8 @@ export const useSelect = <
249
249
  {
250
250
  setOptions(
251
251
  data.data.map((item) => ({
252
- label: get(item, optionLabel) as string,
253
- value: get(item, optionValue) as string,
252
+ label: String(get(item, optionLabel)),
253
+ value: String(get(item, optionValue)),
254
254
  })),
255
255
  );
256
256
  }