refine icon indicating copy to clipboard operation
refine copied to clipboard

[BUG] `useDrawerForm` and `defaultFormValues` does not work

Open zxdstyle opened this issue 1 year ago • 4 comments

Describe the bug

useDrawerForm and defaultFormValues does not work

Steps To Reproduce

https://codesandbox.io/p/devbox/pedantic-bhabha-jqdy0y?embed=1&file=%2Fsrc%2Fpages%2Fposts%2Flist.tsx%3A47%2C28

Expected behavior

defaultFormValues is work

Packages

{
    "@refinedev/antd": "^5.37.4",
    "@refinedev/cli": "^2.16.26",
    "@refinedev/core": "^4.47.2",
    "@refinedev/react-router-v6": "^4.5.5",
    "@refinedev/simple-rest": "^5.0.2",
    "antd": "^5.0.5",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-router-dom": "^6.8.1",
    "typescript": "^4.7.4"
}

Additional Context

No response

zxdstyle avatar Mar 07 '24 05:03 zxdstyle

Hello @zxdstyle, Thanks for the issue. defaultFormValues should not be available as a prop. We will fix this in the next release.

You can give default values directly from <Form.Item>

  <Form.Item
    label="Title"
    name="title"
    initialValue="default title"
    rules={[
      {
        required: true,
      },
    ]}
  >

alicanerdurmaz avatar Mar 08 '24 07:03 alicanerdurmaz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 07 '24 10:05 stale[bot]