Skip to content

Commit

Permalink
Avoid nested originalEvent in onSelectionChange
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelly Haglund committed Aug 14, 2019
1 parent 9cbcca8 commit e9f7a6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/datatable/DataTable.js
Expand Up @@ -1002,9 +1002,12 @@ export class DataTable extends Component {
}

if(this.props.onSelectionChange) {
const { originalEvent, ...rest } = event;

this.props.onSelectionChange({
originalEvent: event,
value: selection
originalEvent,
value: selection,
...rest
});
}
}
Expand Down

0 comments on commit e9f7a6e

Please sign in to comment.