mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
chore(FE-147): set generic when using getByPath function
This commit is contained in:
@@ -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),
|
||||
};
|
||||
})
|
||||
: [];
|
||||
|
||||
Reference in New Issue
Block a user