Minor Changes
-
#5609
fd38d9c71a6
Thanks @Cavdy! - feat: ability to pass an argument to usePermissions #5607Ability to pass an argument or parameters to usePermissions hook
const params = { tenantId: "id" }; usePermissions({ params });
Resolves #5607
-
#5610
17c39ee2ee0
Thanks @Conqxeror! - feat: allow passing function tooptionLabel
andoptionValue
props foruseSelect
hook.const { options } = useSelect({ optionLabel: (item) => `${item.firstName} ${item.lastName}`, optionValue: (item) => item.id, });
feat: add
searchField
prop touseSelect
hook.Can be used to specify which field will be searched with value given to
onSearch
function.const { onSearch } = useSelect({ searchField: "name" }); onSearch("John"); // Searchs by `name` field with value John.
By default, it uses
optionLabel
's value, ifoptionLabel
is a string. Usestitle
field otherwise.// When `optionLabel` is string. const { onSearch } = useSelect({ optionLabel: "name" }); onSearch("John"); // Searchs by `name` field with value John. // When `optionLabel` is function. const { onSearch } = useSelect({ optionLabel: (item) => `${item.id} - ${item.name}`, }); onSearch("John"); // Searchs by `title` field with value John.
Resolves #4880
Patch Changes
-
#5695
79865affa1c
Thanks @BatuhanW! - chore: apply biome format and fix lint errors. -
Updated dependencies [
79865affa1c
]:- @refinedev/devtools-internal@1.1.6