diff --git a/packages/amis/src/renderers/Table/index.tsx b/packages/amis/src/renderers/Table/index.tsx index 445dee30272..2a42fefecb8 100644 --- a/packages/amis/src/renderers/Table/index.tsx +++ b/packages/amis/src/renderers/Table/index.tsx @@ -3047,7 +3047,7 @@ export class TableRendererBase extends Table { index?: number | string, condition?: any ) { - const {store} = this.props; + const {store, host} = this.props; if (index !== undefined || condition !== undefined) { const targets = await this.getEventTargets( @@ -3058,13 +3058,19 @@ export class TableRendererBase extends Table { targets.forEach(target => { target.updateData(values); }); - } else { - const data = { - ...values, - rows: values.rows ?? values.items // 做个兼容 - }; - return store.updateData(data, undefined, replace); + return; } + + if (host) { + host.setData?.(values, replace); + } + + const data = { + ...values, + rows: values.rows ?? values.items // 做个兼容 + }; + + return store.updateData(data, undefined, replace); } getData() {