slow-yellowS
Refine2y ago
7 replies
slow-yellow

Title: Ant Design Form Items Display Values Upon Submission

I am using the listing methods from RefineDev, such as useList, along with the Ant Design template. In all forms, when I submit, the value from the select input is displayed. For example, in the code snippet below, the ID is displayed upon submission.
  const { selectProps: officesProps } = useSelect<any>({
      resource: "offices",
      dataProviderName: "rest",
      pagination: {
        mode: "off",
      },
      onSearch: (value) => [
        {
          field: "name",
          operator: "contains",
          value: `%${value.toUpperCase()}%`,
        },
      ],
      optionLabel: (item) => item.name,
      optionValue: (item) => item.id,
    });
Was this page helpful?