mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix: input-table未下发static、删除逻辑优化
This commit is contained in:
parent
9e724f467f
commit
0197c28f17
@ -350,6 +350,7 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
// Form会向FormItem下发disabled属性,disbaled 属性值也需要同步到
|
||||
if (
|
||||
prevProps.disabled !== props.disabled ||
|
||||
prevProps.static !== props.static ||
|
||||
props.$schema.disabled !== prevProps.$schema.disabled ||
|
||||
props.$schema.static !== prevProps.$schema.static
|
||||
) {
|
||||
@ -1028,6 +1029,11 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
newValue = spliceTree(newValue, indexes, 1);
|
||||
this.reUseRowId(newValue, originItems, indexes);
|
||||
|
||||
this.setState(
|
||||
{
|
||||
items: newValue
|
||||
},
|
||||
async () => {
|
||||
// change value
|
||||
const prevented = await this.emitValue(newValue);
|
||||
if (prevented) {
|
||||
@ -1041,6 +1047,8 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
item
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
rowPathPlusOffset(path: string, offset = 0) {
|
||||
const list = path.split('.').map((item: any) => parseInt(item, 10));
|
||||
|
Loading…
Reference in New Issue
Block a user