Skip to content
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

releasing 31.3.1 with Dash 3 support #362

Merged
merged 8 commits into from
Mar 19, 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
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to `dash-ag-grid` will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).
Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source Dash AG Grid repo

## [31.3.1rc1] - 2025-02-10
## [31.3.1] - 2025-03-17

### 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)
Expand All @@ -13,6 +13,9 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D
### Added
- [#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

### Changed
- [#362](https://github.com/plotly/dash-ag-grid/pull/362) bumping to v`31.3.4` for the grid

## [31.3.0] - 2024-11-22

### Fixed
Expand Down
74 changes: 39 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash-ag-grid",
"version": "31.3.1rc1",
"version": "31.3.1",
"description": "Dash wrapper around AG Grid, the best interactive data grid for the web.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -33,9 +33,9 @@
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"ag-grid-community": "31.3.2",
"ag-grid-enterprise": "31.3.2",
"ag-grid-react": "31.3.2",
"ag-grid-community": "31.3.4",
"ag-grid-enterprise": "31.3.4",
"ag-grid-react": "31.3.4",
"@mui/icons-material": "^5.15.7",
"@mui/material": "^5.15.7",
"d3-format": "^3.1.0",
Expand Down
13 changes: 9 additions & 4 deletions src/lib/fragments/AgGrid.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,10 @@ 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) &&
!(loading_state && this.selectionEventFired)
// eslint-disable-next-line no-undefined
!(typeof loading_state !== 'undefined'
? loading_state && this.selectionEventFired
: this.selectionEventFired)
) {
if (!this.dataUpdates) {
setTimeout(() => {
Expand Down Expand Up @@ -899,10 +902,12 @@ export default class DashAgGrid extends Component {
onSelectionChanged() {
setTimeout(() => {
if (!this.pauseSelections) {
// Flag that the selection event was fired
this.selectionEventFired = true;
const selectedRows = this.state.gridApi.getSelectedRows();
this.customSetProps({selectedRows});
if (!equals(selectedRows, this.props.selectedRows)) {
// Flag that the selection event was fired
this.selectionEventFired = true;
this.customSetProps({selectedRows});
}
}
}, 1);
}
Expand Down
10 changes: 4 additions & 6 deletions tests/test_event_listeners.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,13 @@ def test_el001_event_listener(dash_duo):

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

# Test right click
action = utils.ActionChains(dash_duo.driver)
action.context_click(grid.get_cell(0, 2)).perform()
cellClicked = dash_duo.find_element('#log').text
assert json.loads(cellClicked).get('value') == 13
assert json.loads(cellClicked).get('contextMenu')
until(lambda: json.loads(dash_duo.find_element('#log').text).get('value') == 13, timeout=3)
until(lambda: json.loads(dash_duo.find_element('#log').text).get('contextMenu'), timeout=3)

def test_el002_event_listener(dash_duo):
app = Dash(__name__, suppress_callback_exceptions=True)
Expand All @@ -86,7 +84,7 @@ def test_el002_event_listener(dash_duo):

# Test left click.
grid.get_cell(1, 2).click()
assert dash_duo.find_element('#log').text == "rawr"
until(lambda: dash_duo.find_element('#log').text == "rawr", timeout=3)

def test_el003_event_listener(dash_duo):
app = Dash(__name__, suppress_callback_exceptions=True)
Expand Down