chore(FE-147): set generic when using getByPath function

This commit is contained in:
ValdiANS
2025-10-23 12:52:29 +07:00
parent 204369e0fe
commit 3c8bdfbdac
+2 -2
View File
@@ -252,8 +252,8 @@ const useSelect = <T,>(
const options = isResponseSuccess(data)
? data.data.map((item) => {
return {
value: getByPath(item, valueKey as string),
label: getByPath(item, labelKey as string),
value: getByPath<T, number>(item, valueKey as string),
label: getByPath<T, string>(item, labelKey as string),
};
})
: [];