mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 12:08:13 +08:00
修复 Table quickEdit 内联模式修改完失去焦点问题
This commit is contained in:
parent
4c5d60ae0a
commit
01bc463e2a
@ -73,7 +73,7 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
];
|
||||
|
||||
entries:Map<any, number>;
|
||||
entityId: number = 0;
|
||||
entityId: number = 1;
|
||||
subForms:any = {};
|
||||
constructor(props:TableProps) {
|
||||
super(props);
|
||||
@ -513,12 +513,16 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
newValue.splice(rowIndex, 0, data);
|
||||
});
|
||||
} else {
|
||||
const idx = rowIndexes as number;
|
||||
const origin = newValue[idx];
|
||||
const data = {
|
||||
...newValue.splice(rowIndexes as number, 1)[0],
|
||||
...newValue.splice(idx, 1)[0],
|
||||
...diff
|
||||
};
|
||||
|
||||
newValue.splice(rowIndexes as number, 0, data);
|
||||
this.entries.set(data, this.entries.get(origin) || this.entityId++);
|
||||
this.entries.delete(origin);
|
||||
}
|
||||
|
||||
onChange(newValue);
|
||||
|
Loading…
Reference in New Issue
Block a user