mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-15 14:30:27 +00:00
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:
co-authored by
Tanner Linsley
parent
a52a2e1265
commit
7498059e98
+6
-6
@@ -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,
|
||||
|
||||
@@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user