Skip to content

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

@wfwfwf128

Description

@wfwfwf128

使用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();
          }
        }
      }}
    />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions