react antd issue of selectedRows

In the table, often used in radio and multi-select functions. Here there is a method,

 

 When the trigger onchange back there are two arrays, [selectedRowKeys , SelectedRows ], and the currently selected keys each,

Here that is a bug selectedRows when clicking on a selected page

 

 Here is a user, but when click on the page when the user clicks on the increase again, the selected user will be bug, last selected user will disappear, but only display the selected page in your current user.

 

 In simple terms: that you selected in the first page of three people, click Page (or query data to replace the current page) selection again; the last of three people will not see. The number shows the number of people you now click on the selected;

This is the use of bug selectRows encountered;

Solution I used: 

 selectedRowKeys: this is not a bug;

With the key selectedRowKeys; and all your data matching;

 

Guess you like

Origin www.cnblogs.com/zhanghongkun/p/11431335.html