Skip to content

Commit b0a7b6c

Browse files
authored
Merge pull request #362 from BSd3v/31.3.1
releasing 31.3.1 with Dash 3 support
2 parents f1d68e2 + 9f495db commit b0a7b6c

File tree

5 files changed

+60
-50
lines changed

5 files changed

+60
-50
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to `dash-ag-grid` will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
55
Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source Dash AG Grid repo
66

7-
## [31.3.1rc1] - 2025-02-10
7+
## [31.3.1] - 2025-03-17
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)
@@ -13,6 +13,9 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D
1313
### Added
1414
- [#352](https://github.com/plotly/dash-ag-grid/pull/352) Adds `eventData` prop for devs to send arbitrary events from the grid events complete with an auto timestamp
1515

16+
### Changed
17+
- [#362](https://github.com/plotly/dash-ag-grid/pull/362) bumping to v`31.3.4` for the grid
18+
1619
## [31.3.0] - 2024-11-22
1720

1821
### Fixed

package-lock.json

+39-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-ag-grid",
3-
"version": "31.3.1rc1",
3+
"version": "31.3.1",
44
"description": "Dash wrapper around AG Grid, the best interactive data grid for the web.",
55
"repository": {
66
"type": "git",
@@ -33,9 +33,9 @@
3333
"dependencies": {
3434
"@emotion/react": "^11.11.3",
3535
"@emotion/styled": "^11.11.0",
36-
"ag-grid-community": "31.3.2",
37-
"ag-grid-enterprise": "31.3.2",
38-
"ag-grid-react": "31.3.2",
36+
"ag-grid-community": "31.3.4",
37+
"ag-grid-enterprise": "31.3.4",
38+
"ag-grid-react": "31.3.4",
3939
"@mui/icons-material": "^5.15.7",
4040
"@mui/material": "^5.15.7",
4141
"d3-format": "^3.1.0",

src/lib/fragments/AgGrid.react.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,10 @@ export default class DashAgGrid extends Component {
782782
// Call the API to select rows unless the update was triggered by a selection made in the UI
783783
if (
784784
!equals(selectedRows, prevProps.selectedRows) &&
785-
!(loading_state && this.selectionEventFired)
785+
// eslint-disable-next-line no-undefined
786+
!(typeof loading_state !== 'undefined'
787+
? loading_state && this.selectionEventFired
788+
: this.selectionEventFired)
786789
) {
787790
if (!this.dataUpdates) {
788791
setTimeout(() => {
@@ -899,10 +902,12 @@ export default class DashAgGrid extends Component {
899902
onSelectionChanged() {
900903
setTimeout(() => {
901904
if (!this.pauseSelections) {
902-
// Flag that the selection event was fired
903-
this.selectionEventFired = true;
904905
const selectedRows = this.state.gridApi.getSelectedRows();
905-
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+
}
906911
}
907912
}, 1);
908913
}

tests/test_event_listeners.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,13 @@ def test_el001_event_listener(dash_duo):
5252

5353
# Test left click.
5454
grid.get_cell(1, 2).click()
55-
cellClicked = dash_duo.find_element('#log').text
56-
assert json.loads(cellClicked).get('value') == 15
55+
until(lambda: json.loads(dash_duo.find_element('#log').text).get('value') == 15, timeout=3)
5756

5857
# Test right click
5958
action = utils.ActionChains(dash_duo.driver)
6059
action.context_click(grid.get_cell(0, 2)).perform()
61-
cellClicked = dash_duo.find_element('#log').text
62-
assert json.loads(cellClicked).get('value') == 13
63-
assert json.loads(cellClicked).get('contextMenu')
60+
until(lambda: json.loads(dash_duo.find_element('#log').text).get('value') == 13, timeout=3)
61+
until(lambda: json.loads(dash_duo.find_element('#log').text).get('contextMenu'), timeout=3)
6462

6563
def test_el002_event_listener(dash_duo):
6664
app = Dash(__name__, suppress_callback_exceptions=True)
@@ -86,7 +84,7 @@ def test_el002_event_listener(dash_duo):
8684

8785
# Test left click.
8886
grid.get_cell(1, 2).click()
89-
assert dash_duo.find_element('#log').text == "rawr"
87+
until(lambda: dash_duo.find_element('#log').text == "rawr", timeout=3)
9088

9189
def test_el003_event_listener(dash_duo):
9290
app = Dash(__name__, suppress_callback_exceptions=True)

0 commit comments

Comments
 (0)