Antd Modal sets the destroyOnClose not to destroy the value

modal sets destoryOnClose to not destroy the value of modal, and the modal component does not destroy the component after it is closed. As a result, when setting initialValue in FormItem, it can only be assigned when initializing loading, then click View normal, and then click Edit to report an error. Modal cannot set the value (share a modal). The result is attached to the following figure

.

clipboard.png

clipboard.png
clipboard.png
clipboard.png

with code `

    // modal
    <Modal
        width={650}
        okText=""
        title={this.renderHeader(editFlag)}
        visible={visible}
        centered={true}
        onCancel={this.cancelGroup}
        onOk={this.okGroup}
        destroyOnClose={true}
    >
    // 
    if (flag === 2) {
      sourceFrom.setFieldsValue({
        packageVersion: record.current.packageVersion,
        instructions: record.current.instructions
      })
    }
    if (flag === 3) {
      sourceFrom.setFieldsValue({
        packageVersion: record.packageVersion,
        instructions: record.instructions
      })
    }
    `


Jul.04,2022

problem has been resolved,

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e600-2c400.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e600-2c400.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?