Please makes sure these boxes are checked before submitting your PR, thank you!
[x] Make sure you are merging your commits to master branch.
[x] Add some descriptions and refer relative issues for you PR.
[x] Rebase your commits to make your pull request meaningful.
[x] Make sure that your changes pass npm test, npm run lint and npm run build.
Changes in this pull request
this.setState API is asynchronous. That means if we do setState in multiple times before component updated, this.state.selectedRows will be always the old value, not the updated value. Because of that, we should use setStateupdater to do this. Inspected other apis, such as clearSelection and setCurrentRow, I think they will not be affected, so no changes on these.
Table document Multiple select part is updated for the newest, add the usage of toggleRowSelection. Please check, thanks.
Please makes sure these boxes are checked before submitting your PR, thank you!
master
branch.npm test
,npm run lint
andnpm run build
.Changes in this pull request
this.setState
API is asynchronous. That means if we do setState in multiple times before component updated,this.state.selectedRows
will be always the old value, not the updated value. Because of that, we should use setStateupdater
to do this. Inspected other apis, such asclearSelection
andsetCurrentRow
, I think they will not be affected, so no changes on these.Table document
Multiple select
part is updated for the newest, add the usage oftoggleRowSelection
. Please check, thanks.