Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6f5525b
Get unit tests passing
KoolADE85 Jun 25, 2025
b4d428f
refactor wrapper components
KoolADE85 Jun 25, 2025
50a3868
refactor DashAgGrid component
KoolADE85 Jun 26, 2025
5058edf
remove mounted and gridApi from state
KoolADE85 Jun 30, 2025
415ed12
refactor "openGroups" and "rerender" into their own states
KoolADE85 Jun 30, 2025
5d775b0
Move columnState, rowTransactionState, parentState, components all in…
KoolADE85 Jun 30, 2025
4716119
Separate large effects into smaller ones
KoolADE85 Jul 2, 2025
5252092
Remove unnecessary state update
KoolADE85 Jul 2, 2025
4e1b551
Memoize component
KoolADE85 Jul 4, 2025
c2109e4
Fix bug with initial selections
KoolADE85 Jul 10, 2025
a7534ee
code cleanup
KoolADE85 Jul 10, 2025
224ea62
Fix bug setting `columnState` prop
KoolADE85 Jul 14, 2025
e95cff2
Make test locale-agnostic
KoolADE85 Jul 14, 2025
682bca3
- removing redundant initial gridApi as useEffect was listening to it…
BSd3v Jul 15, 2025
250dca4
fix for lint
BSd3v Jul 15, 2025
a123e44
adjustments for timing of the sizing test
BSd3v Jul 15, 2025
ea5c15f
Revert test change
KoolADE85 Jul 15, 2025
3f586b6
Enforce a locale for cell formatting tests
KoolADE85 Jul 16, 2025
798c8e1
Merge pull request #380 from plotly/refactor/functional-component
KoolADE85 Jul 18, 2025
878d51f
Merge branch 'main' into chore/fix-locale-in-test
KoolADE85 Jul 18, 2025
75d7f05
Merge pull request #384 from plotly/chore/fix-locale-in-test
KoolADE85 Jul 18, 2025
758c703
Fix race condition in paginationGoto prop
KoolADE85 Jul 18, 2025
eb20376
lint
KoolADE85 Jul 18, 2025
1510065
Merge pull request #386 from plotly/bugfix/pagination-race-condition
KoolADE85 Jul 18, 2025
f87c727
Add `checkboxes` and `rowSelection` to propCategories.js, remove `che…
sdidier-dev Jul 20, 2025
306703b
Merge branch 'main' into v32-add-props-in-propCategories
sdidier-dev Jul 21, 2025
8bb08e2
Add support for new Selection API while maintaining backward compatib…
sdidier-dev Jul 22, 2025
507ecf4
Merge remote-tracking branch 'origin/v32-add-props-in-propCategories'…
sdidier-dev Jul 22, 2025
75a74ed
Run `npm run format`
sdidier-dev Jul 22, 2025
3b7fa53
Merge pull request #387 from sdidier-dev/v32-add-props-in-propCategories
KoolADE85 Jul 23, 2025
d825b32
v32.3.0
KoolADE85 Jul 23, 2025
afeaeb9
Merge pull request #388 from plotly/release/32.3.0
KoolADE85 Jul 23, 2025
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ 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

## [32.3.0] - 2025-07-23

### Changed
- Component is refactored to be a function component rather than a class

### Fixed
- [#387](https://github.com/plotly/dash-ag-grid/pull/387) fixed `isRowSelectable` prop ([issue #379](https://github.com/plotly/dash-ag-grid/issues/379))

## [32.3.0rc0] - 2025-04-15

### Fixed
Expand Down
1,736 changes: 857 additions & 879 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash-ag-grid",
"version": "32.3.0rc0",
"version": "32.3.0",
"description": "Dash wrapper around AG Grid, the best interactive data grid for the web.",
"repository": {
"type": "git",
Expand Down
65 changes: 28 additions & 37 deletions src/lib/components/AgGrid.react.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import LazyLoader from '../LazyLoader';
import React, {Component, lazy, Suspense} from 'react';
import React, {lazy, Suspense, useState, useCallback, useEffect} from 'react';

const RealAgGrid = lazy(LazyLoader.agGrid);
const RealAgGridEnterprise = lazy(LazyLoader.agGridEnterprise);
Expand All @@ -12,55 +12,46 @@ function getGrid(enable) {
/**
* Dash interface to AG Grid, a powerful tabular data component.
*/
class DashAgGrid extends Component {
constructor(props) {
super(props);
function DashAgGrid(props) {
const [state, setState] = useState({
mounted: false,
rowTransaction: null,
});

this.state = {
mounted: false,
rowTransaction: null,
};

this.buildArray = this.buildArray.bind(this);
}

static dashRenderType = true;

buildArray(arr1, arr2) {
const buildArray = useCallback((arr1, arr2) => {
if (arr1) {
if (!arr1.includes(arr2)) {
return [...arr1, arr2];
}
return arr1;
}
return [JSON.parse(JSON.stringify(arr2))];
}

UNSAFE_componentWillReceiveProps(nextProps) {
if (this.props.rowTransaction && !this.state.mounted) {
if (nextProps.rowTransaction !== this.props.rowTransaction) {
this.setState({
rowTransaction: this.buildArray(
this.state.rowTransaction,
this.props.rowTransaction
),
});
}
}, []);

useEffect(() => {
if (props.rowTransaction && !state.mounted) {
setState((prevState) => ({
...prevState,
rowTransaction: buildArray(
prevState.rowTransaction,
props.rowTransaction
),
}));
}
}
}, [props.rowTransaction, state.mounted, buildArray]);

render() {
const {enableEnterpriseModules} = this.props;
const {enableEnterpriseModules} = props;
const RealComponent = getGrid(enableEnterpriseModules);

const RealComponent = getGrid(enableEnterpriseModules);
return (
<Suspense fallback={null}>
<RealComponent parentState={this.state} {...this.props} />
</Suspense>
);
}
return (
<Suspense fallback={null}>
<RealComponent parentState={state} {...props} />
</Suspense>
);
}

DashAgGrid.dashRenderType = true;

DashAgGrid.defaultProps = {
className: 'ag-theme-alpine',
resetColumnState: false,
Expand Down
Loading
Loading