We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ModelForm 使用request会显示上一次的数据 查看request获取的值也是最新的 也使用了以下属性
modalProps={{ destroyOnClose:true, }}
点击第一条数据,modelForm 会显示第一条数据, 关闭modelForm 点击二条数据,modelForm 会显示第一条数据
显示本次数据
https://codesandbox.io/s/json-lai-sheng-cheng-fen-bu-biao-dan-forked-dtkwrd?file=/App.tsx:752-766
"@ant-design/pro-components": "2.6.10", "antd": "5.7.0",
The text was updated successfully, but these errors were encountered:
这个问题似乎是由于 ModelForm 组件在每次关闭后没有销毁导致的。你可以尝试在 modalProps 中添加 destroyOnClose 属性并将其设置为true,这样每次关闭 ModelForm 后,下次打开时就会重新创建一个新的实例,而不会保留上一次的数据。你可以在代码中添加以下代码:
modalProps={{ destroyOnClose: true, }}
另外,我注意到你的代码中引用的 "@ant-design/pro-components" 版本是"2.6.10",如果还不行可以给 modal 设置一个 key
Sorry, something went wrong.
No branches or pull requests
🐛 bug 描述
ModelForm 使用request会显示上一次的数据
查看request获取的值也是最新的
也使用了以下属性
📷 复现步骤 | Recurrence steps
点击第一条数据,modelForm 会显示第一条数据,
关闭modelForm
点击二条数据,modelForm 会显示第一条数据
🏞 期望结果 | Expected results
显示本次数据
💻 复现代码 | Recurrence code
https://codesandbox.io/s/json-lai-sheng-cheng-fen-bu-biao-dan-forked-dtkwrd?file=/App.tsx:752-766
© 版本信息
🚑 其他信息
The text was updated successfully, but these errors were encountered: