recent-tealR
Refineโ€ข3y agoโ€ข
7 replies
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
refine/edit.tsx at master ยท refinedev/refine
Was this page helpful?