react-component / react-component/drawer
6.1.4 版本设置 destroyOnClose 为true后,重新打开,弹窗里的内容没有渲染
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 425
- Forks
- 108
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 1
Description
使用BetaSchemaForm, drawer的版本号为6.1.4时,弹窗打开再关才后,再次打开时,弹窗里的内容没有渲染,一片空白。
<BetaSchemaForm
layoutType="DrawerForm"
formRef={formRef}
title={titleTxt}
columns={fromType === 'parent' ? parentColumns : childColumns}
visible={visible}
drawerProps={{
destroyOnClose: true,
maskClosable: type === 'view',
}}
onFinish={onFinish}
onVisibleChange={async (vis: boolean) => {
await setParam({ versionName: '', id: null });
if (!vis) {
if (formRef?.current) {
formRef?.current.resetFields();
}
onClose(false);
} else {
if (record && record.id) {
if (formRef?.current) {
formRef?.current?.setFieldsValue(record);
}
} else {
formRef?.current?.resetFields();
}
}
}}
/>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the supplied BetaSchemaForm usage, focusing on DrawerForm with destroyOnClose enabled and the second opening. Trace the drawer's destroy and remount behavior, then verify that the drawer content renders after reopening and add coverage if the repository's existing tests provide a suitable entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100