@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/CHANGELOG.md +10 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/data/useList.d.ts +1 -1
- package/dist/hooks/data/useList.d.ts.map +1 -1
- package/dist/hooks/useSelect/index.d.ts +2 -2
- package/dist/hooks/useSelect/index.d.ts.map +1 -1
- package/dist/iife/index.js +3 -3
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/data/useList.ts +1 -1
- package/src/hooks/useSelect/index.ts +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinedev/core",
|
|
3
|
-
"version": "4.44.
|
|
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
|
|
42
|
-
? keyof
|
|
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
|
|
49
|
-
? keyof
|
|
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)
|
|
218
|
-
value: get(item, optionValue)
|
|
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)
|
|
253
|
-
value: get(item, optionValue)
|
|
252
|
+
label: String(get(item, optionLabel)),
|
|
253
|
+
value: String(get(item, optionValue)),
|
|
254
254
|
})),
|
|
255
255
|
);
|
|
256
256
|
}
|