useRowSelect: remove redundant checks (#1918)

* useRowSelect: remove redundant checks

* Update useRowSelect.js

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
This commit is contained in:
Roman Komarov
2020-02-21 07:03:27 -07:00
committed by GitHub
co-authored by Tanner Linsley
parent a52a2e1265
commit 7498059e98
2 changed files with 8 additions and 8 deletions
+6 -6
View File
@@ -1,13 +1,13 @@
{
"dist/index.js": {
"bundled": 130976,
"minified": 61378,
"gzipped": 15745
"bundled": 130947,
"minified": 61370,
"gzipped": 15740
},
"dist/index.es.js": {
"bundled": 130034,
"minified": 60537,
"gzipped": 15571,
"bundled": 130005,
"minified": 60529,
"gzipped": 15565,
"treeshaked": {
"rollup": {
"code": 80,
+2 -2
View File
@@ -136,9 +136,9 @@ function reducer(state, action, previousState, instance) {
const row = rowsById[id]
if (!row.isGrouped) {
if (!isSelected && shouldExist) {
if (shouldExist) {
newSelectedRowIds[id] = true
} else if (isSelected && !shouldExist) {
} else {
delete newSelectedRowIds[id]
}
}