useSelect with custom label function
I want to use the refine/antd useSelect, but I want a custom function to determine the label for each element of the resultant <Select> component. Is there a way to do that?
useSelect hook from @refinedev/antd. The useSelect hook provides an property that allows you to customize how the label is generated for each option.useSelect hook.optionLabeloptionLabeloptionLabelitemitemselectProps<Select>const { selectProps } = useSelect({
resource: "categories",
optionLabel: (item) => `${item.firstName} ${item.lastName}`,
});<Select {...selectProps} />