From 1847bce58881e085c0017946efb0cd3bc3d1cf44 Mon Sep 17 00:00:00 2001 From: ranwawa <30344590+ranwawa@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:13:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20table=E7=9A=84select=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E5=88=A4=E6=96=ADfalttenedRows=E8=BF=9B=E8=A1=8C=E9=80=89?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E4=BB=A5=E4=BE=BF=E9=80=89=E4=B8=AD=E5=AD=90?= =?UTF-8?q?=E8=8A=82=E7=82=B9=20close:9714=20(#9715)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/src/renderers/Table/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/amis/src/renderers/Table/index.tsx b/packages/amis/src/renderers/Table/index.tsx index d329603e7..012831493 100644 --- a/packages/amis/src/renderers/Table/index.tsx +++ b/packages/amis/src/renderers/Table/index.tsx @@ -2774,12 +2774,12 @@ export default class Table extends React.Component { store.clear(); break; case 'select': - const dataSource = store.getData(data); const selected: Array = []; - dataSource.items.forEach((item: any, rowIndex: number) => { - const flag = evalExpression(args?.selected, {record: item, rowIndex}); + store.falttenedRows.forEach((item: any, rowIndex: number) => { + const record = item.data; + const flag = evalExpression(args?.selected, {record, rowIndex}); if (flag) { - selected.push(item); + selected.push(record); } }); store.updateSelected(selected, valueField);