mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
Improve form demo
This commit is contained in:
parent
e0298dcc13
commit
2fa90b17d0
@ -39,9 +39,8 @@ class DynamicFieldSet extends React.Component {
|
||||
add = () => {
|
||||
const { form } = this.props;
|
||||
// can use data-binding to get
|
||||
const myId = id++;
|
||||
const keys = form.getFieldValue('keys');
|
||||
const nextKeys = keys.concat(myId);
|
||||
const nextKeys = keys.concat(++id);
|
||||
// can use data-binding to set
|
||||
// important! notify form to detect changes
|
||||
form.setFieldsValue({
|
||||
|
Loading…
Reference in New Issue
Block a user