How does the antDesign Form form initialValue change after manual input?

antDesign Form can assign default values to input in the following ways:

const myValue = random() // 
...
{
    getFieldDecorator("userName", {initialValue: myValue}]})(  <Input /> )
}

as shown in the code above, the initial value of Input changes in my requirements.

however, after I manually type in the input box, the program cannot assign a value to the input box, that is, no matter how the value of myValue changes, the value displayed in the input box on the screen is the one I entered manually.

the essential reason for my analysis is that initialValue sets the default value of the Input component, and once Input has a value, which I entered manually, the default value is invalid.

but when using Form getFieldDecorator, is there a way to set value, directly to Input? what should I do?

Mar.14,2021

this.props.form.setFieldsValue({
  key: value
});

resolved:

Form.create({
    mapPropsToFields(props) {
        ...
        result[yourKey] = Form.createFormField({
           value: yourValue,
        });
        return result
    }
})(<YourComponent/>)

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-1b3a103-2ba37.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-1b3a103-2ba37.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?