react-component / react-component/drawer

6.1.4 版本设置 destroyOnClose 为true后,重新打开,弹窗里的内容没有渲染

Open
#410 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.