recent-tealR
Refineβ€’3y ago
recent-teal

The default value seems to not be valid for the Select component, mode='multiple '

The data comes back fine, but it is not displayed on the component

I wrote it with reference to this, but this one is single-select πŸ‘‡
https://github.com/refinedev/refine/blob/master/examples/form-antd-use-form/src/pages/posts/edit.tsx


I've tried giving a default value manually πŸ‘‡
But it didn't live up to my expectations
 const { selectProps: localeCountry } = useSelect({
    resource: 'xxx',
    optionLabel: 'name',
    pagination: {
      mode: 'server',
    },
    defaultValue: ['1','2'],
  })

The component will look like this
Need your help! thank youοΌπŸ‘¨πŸ»β€πŸ’»
image.png
GitHub
Build your React-based CRUD applications, without constraints. - refine/edit.tsx at master Β· refinedev/refine
Was this page helpful?