File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ export default {
3030 * Add a new child.
3131 */
3232 addChild () {
33- this .field .children .push (this .replaceIndexesInSchema (this .field ))
33+ const maxKey = this .field .children [this .field .children .length - 1 ].key || Math .max .apply (Math , this .field .children .map (({ id }) => id));
34+ this .field .schema .key = maxKey + 1 ;
35+ this .field .children .push (this .replaceIndexesInSchema (this .field ));
3436 },
3537
3638 /**
Original file line number Diff line number Diff line change 44 <template v-if =" field .children .length > 0 " >
55 <card
66 :class =" { 'overflow-hidden': field.panel && !index }"
7- :key =" childIndex "
7+ :key =" child.id || child.key "
88 v-for =" (child, childIndex) in field.children"
99 >
1010 <nested-form-header
You can’t perform that action at this time.
0 commit comments