Skip to content

adjustments for dash 3 support #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ jobs:
- name: Run tests
run: |
source .venv/bin/activate
pytest --headless -k "not test_versioning"
pytest --headless

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D

### Fixed
- [#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)

- [#353](https://github.com/plotly/dash-ag-grid/pull/353) Adjustments for support of Dash 3

## [31.3.0] - 2024-11-22

Expand Down
12 changes: 9 additions & 3 deletions src/lib/fragments/AgGrid.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,13 @@ export default class DashAgGrid extends Component {
scrollTo,
rowTransaction,
updateColumnState,
loading_state,
} = this.props;

if (this.state.gridApi && prevProps.loading_state.is_loading) {
if (
this.state.gridApi &&
(!loading_state || prevProps.loading_state?.is_loading)
) {
if (
this.props.columnState !== prevProps.columnState &&
!this.state.columnState_push
Expand Down Expand Up @@ -769,12 +773,11 @@ export default class DashAgGrid extends Component {
// Call the API to select rows unless the update was triggered by a selection made in the UI
if (
!equals(selectedRows, prevProps.selectedRows) &&
!this.selectionEventFired
!(loading_state && this.selectionEventFired)
) {
if (!this.dataUpdates) {
setTimeout(() => {
if (!this.dataUpdates) {
this.pauseSelections = true;
this.setSelection(selectedRows);
}
}, 10);
Expand Down Expand Up @@ -870,6 +873,9 @@ export default class DashAgGrid extends Component {
if (!isEmpty(filterModel)) {
gridApi.setFilterModel(filterModel);
}
setTimeout(() => {
this.dataUpdates = false;
}, 1);
}
}

Expand Down
1 change: 1 addition & 0 deletions tests/test_sizing_buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,3 +457,4 @@ def selected(state):

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