hurt-tomatoH
Refine2y ago
4 replies
hurt-tomato

optionLabel don't work as a function

I'm trying to use useSelect function with a custom label, for this the documentation says that you can use optionLabel as a function but is not working
I'm doing it like this:
  const { selectProps: vehiclesSelectProps } = useSelect({
    resource: "vehicles",
    optionLabel: (item: any) =>
      `${item.type.model}-${item.type.provider}-${item.plate}`,
  });
Was this page helpful?