Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] useDrawerForm and defaultFormValues does not work #5727

Open
zxdstyle opened this issue Mar 7, 2024 · 2 comments
Open

[BUG] useDrawerForm and defaultFormValues does not work #5727

zxdstyle opened this issue Mar 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@zxdstyle
Copy link

zxdstyle commented Mar 7, 2024

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 zxdstyle added the bug Something isn't working label Mar 7, 2024
@alicanerdurmaz
Copy link
Member

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,
      },
    ]}
  >

Copy link

stale bot commented May 7, 2024

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 stale bot added the wontfix This will not be worked on label May 7, 2024
@BatuhanW BatuhanW added good first issue Good for newcomers and removed wontfix This will not be worked on labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants