Skip to content

Commit

Permalink
fix(Grid): add data in selected rows if it exists in view
Browse files Browse the repository at this point in the history
  • Loading branch information
pdudhat committed Jul 28, 2021
1 parent e643f8b commit f52383a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,10 @@ class Grid extends React.PureComponent {
const { view } = this.state

for (let r = y1; r <= y2; r++) {
selectedRows.push(view[r])
if (view[r] != null) selectedRows.push(view[r])
}
for (let c = x1; c <= x2; c++) {
selectedHeaders.push(headers[c])
if (headers[c] != null) selectedHeaders.push(headers[c])
}

onSelectionChange({ selectedRows, selectedHeaders })
Expand Down

0 comments on commit f52383a

Please sign in to comment.