XinQiXiao / bike-bg-app

A bike backstage management project based on react+antd.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table radio 单选遇到无法选中的情况

XinQiXiao opened this issue · comments

commented

关于 table rowSelection , 单选 (type = 'radio'), 单选取值时:
onClick:()=>{this._onRowClick(record, idx)}
_onRowClick = (record, index)=>{let selectedKeys = [index]; ....}
这里的, selectedKeys 取得key 不一定是 index 而是要跟 item.id一直才可以选中。
总结:selectedKeys匹配实际是 item.id