Nishant Shrestha
Nishant Shrestha
RRefine
Created by ambitious-aqua on 6/11/2023 in #ask-any-question
I want to combine option labels in the useSelect hook of refine antd.
This only shows firstName as label as expected.
const { selectProps: userSelectProps } = useSelect({
resource: "users",
defaultValue: ordersData?.userId,
optionLabel: "firstName",
optionValue: "id",
});
const { selectProps: userSelectProps } = useSelect({
resource: "users",
defaultValue: ordersData?.userId,
optionLabel: "firstName",
optionValue: "id",
});
I want to show both firstName and lastName. Is there a way to acheive this? I wanted something like:
const { selectProps: userSelectProps } = useSelect({
resource: "users",
defaultValue: ordersData?.userId,
optionLabel: (option) => `${option.firstName} ${option.lastName}`,
optionValue: "id",
});
const { selectProps: userSelectProps } = useSelect({
resource: "users",
defaultValue: ordersData?.userId,
optionLabel: (option) => `${option.firstName} ${option.lastName}`,
optionValue: "id",
});
45 replies
RRefine
Created by foreign-sapphire on 6/2/2023 in #ask-any-question
Auto fill filter form in Table Filter
No description
16 replies