mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 12:38:53 +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 属性值也需要同步到
|
// Form会向FormItem下发disabled属性,disbaled 属性值也需要同步到
|
||||||
if (
|
if (
|
||||||
prevProps.disabled !== props.disabled ||
|
prevProps.disabled !== props.disabled ||
|
||||||
|
prevProps.static !== props.static ||
|
||||||
props.$schema.disabled !== prevProps.$schema.disabled ||
|
props.$schema.disabled !== prevProps.$schema.disabled ||
|
||||||
props.$schema.static !== prevProps.$schema.static
|
props.$schema.static !== prevProps.$schema.static
|
||||||
) {
|
) {
|
||||||
@ -1028,6 +1029,11 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
|||||||
newValue = spliceTree(newValue, indexes, 1);
|
newValue = spliceTree(newValue, indexes, 1);
|
||||||
this.reUseRowId(newValue, originItems, indexes);
|
this.reUseRowId(newValue, originItems, indexes);
|
||||||
|
|
||||||
|
this.setState(
|
||||||
|
{
|
||||||
|
items: newValue
|
||||||
|
},
|
||||||
|
async () => {
|
||||||
// change value
|
// change value
|
||||||
const prevented = await this.emitValue(newValue);
|
const prevented = await this.emitValue(newValue);
|
||||||
if (prevented) {
|
if (prevented) {
|
||||||
@ -1041,6 +1047,8 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
|||||||
item
|
item
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
rowPathPlusOffset(path: string, offset = 0) {
|
rowPathPlusOffset(path: string, offset = 0) {
|
||||||
const list = path.split('.').map((item: any) => parseInt(item, 10));
|
const list = path.split('.').map((item: any) => parseInt(item, 10));
|
||||||
|
Loading…
Reference in New Issue
Block a user