Skip to content

Commit 9f495db

Browse files
committed
adjustments to help with selection events, should only trigger if its different than the current selectedRows
1 parent 82be4a4 commit 9f495db

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib/fragments/AgGrid.react.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -902,10 +902,12 @@ export default class DashAgGrid extends Component {
902902
onSelectionChanged() {
903903
setTimeout(() => {
904904
if (!this.pauseSelections) {
905-
// Flag that the selection event was fired
906-
this.selectionEventFired = true;
907905
const selectedRows = this.state.gridApi.getSelectedRows();
908-
this.customSetProps({selectedRows});
906+
if (!equals(selectedRows, this.props.selectedRows)) {
907+
// Flag that the selection event was fired
908+
this.selectionEventFired = true;
909+
this.customSetProps({selectedRows});
910+
}
909911
}
910912
}, 1);
911913
}

0 commit comments

Comments
 (0)