Skip to content

Commit 9ffe139

Browse files
authored
Merge pull request #353 from BSd3v/dash-3-support
adjustments for dash 3 support
2 parents 31fdfe9 + 7e42b9e commit 9ffe139

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.github/workflows/python-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,5 @@ jobs:
103103
- name: Run tests
104104
run: |
105105
source .venv/bin/activate
106-
pytest --headless -k "not test_versioning"
106+
pytest --headless
107107

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D
88

99
### Fixed
1010
- [#346](https://github.com/plotly/dash-ag-grid/pull/346) Fixes issue [#347](https://github.com/plotly/dash-ag-grid/issues/347) where styling wasnt considering if the grid had rows without `data`. This is related to the alteration in [#332](https://github.com/plotly/dash-ag-grid/pull/332)
11-
11+
- [#353](https://github.com/plotly/dash-ag-grid/pull/353) Adjustments for support of Dash 3
1212

1313
## [31.3.0] - 2024-11-22
1414

src/lib/fragments/AgGrid.react.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,13 @@ export default class DashAgGrid extends Component {
648648
scrollTo,
649649
rowTransaction,
650650
updateColumnState,
651+
loading_state,
651652
} = this.props;
652653

653-
if (this.state.gridApi && prevProps.loading_state.is_loading) {
654+
if (
655+
this.state.gridApi &&
656+
(!loading_state || prevProps.loading_state?.is_loading)
657+
) {
654658
if (
655659
this.props.columnState !== prevProps.columnState &&
656660
!this.state.columnState_push
@@ -769,12 +773,11 @@ export default class DashAgGrid extends Component {
769773
// Call the API to select rows unless the update was triggered by a selection made in the UI
770774
if (
771775
!equals(selectedRows, prevProps.selectedRows) &&
772-
!this.selectionEventFired
776+
!(loading_state && this.selectionEventFired)
773777
) {
774778
if (!this.dataUpdates) {
775779
setTimeout(() => {
776780
if (!this.dataUpdates) {
777-
this.pauseSelections = true;
778781
this.setSelection(selectedRows);
779782
}
780783
}, 10);
@@ -870,6 +873,9 @@ export default class DashAgGrid extends Component {
870873
if (!isEmpty(filterModel)) {
871874
gridApi.setFilterModel(filterModel);
872875
}
876+
setTimeout(() => {
877+
this.dataUpdates = false;
878+
}, 1);
873879
}
874880
}
875881

tests/test_sizing_buttons.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,3 +457,4 @@ def selected(state):
457457

458458
oldValue = dash_duo.find_element("#columnState").text
459459
dash_duo.driver.set_window_size(1000, 1000)
460+
time.sleep(.2)

0 commit comments

Comments
 (0)