mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix: table的select动作判断falttenedRows进行选中,以便选中子节点 close:9714 (#9715)
This commit is contained in:
parent
c3a7faf3f0
commit
1847bce588
@ -2774,12 +2774,12 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
store.clear();
|
||||
break;
|
||||
case 'select':
|
||||
const dataSource = store.getData(data);
|
||||
const selected: Array<any> = [];
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user