Skip to content

Commit 6025c89

Browse files
authored
Merge pull request #433 from BSd3v/v35
V35
2 parents c75e41a + 261fbbd commit 6025c89

File tree

7 files changed

+128
-101
lines changed

7 files changed

+128
-101
lines changed

package-lock.json

Lines changed: 99 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dash-ag-grid",
3-
"version": "33.3.3",
3+
"version": "35.0.0rc0",
44
"description": "Dash wrapper around AG Grid, the best interactive data grid for the web.",
55
"repository": {
66
"type": "git",
@@ -34,9 +34,9 @@
3434
"@emotion/styled": "^11.11.0",
3535
"@mui/icons-material": "^5.15.7",
3636
"@mui/material": "^5.15.7",
37-
"ag-grid-community": "33.3.2",
38-
"ag-grid-enterprise": "33.3.2",
39-
"ag-grid-react": "33.3.2",
37+
"ag-grid-community": "35.0.0",
38+
"ag-grid-enterprise": "35.0.0",
39+
"ag-grid-react": "35.0.0",
4040
"d3-format": "^3.1.0",
4141
"d3-time": "^3.1.0",
4242
"d3-time-format": "^4.1.0",

src/lib/fragments/AgGrid.react.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
GRID_NESTED_FUNCTIONS,
3030
OBJ_OF_FUNCTIONS,
3131
COLUMN_NESTED_OR_OBJ_OF_FUNCTIONS,
32+
COLUMN_NESTED_OR_OBJ_OF_FUNCTIONS_NO_PARAMS,
3233
PASSTHRU_PROPS,
3334
PROPS_NOT_FOR_AG_GRID,
3435
GRID_DANGEROUS_FUNCTIONS,
@@ -534,7 +535,11 @@ export function DashAgGrid(props) {
534535
}
535536
}
536537
return map((v) => {
537-
if (typeof v === 'object') {
538+
if (
539+
typeof v === 'object' &&
540+
v !== null &&
541+
!Array.isArray(v)
542+
) {
538543
if (typeof v.function === 'string') {
539544
return convertMaybeFunctionNoParams(v);
540545
}
@@ -555,6 +560,12 @@ export function DashAgGrid(props) {
555560
}
556561
return convertCol(value);
557562
}
563+
if (COLUMN_NESTED_OR_OBJ_OF_FUNCTIONS_NO_PARAMS[target]) {
564+
if (has('function', value)) {
565+
return convertMaybeFunctionNoParams(value);
566+
}
567+
return convertCol(value);
568+
}
558569
// not one of those categories - pass it straight through
559570
return value;
560571
}, columnDef);

src/lib/utils/propCategories.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,19 @@ export const COLUMN_NESTED_FUNCTIONS = {
288288
* or may be functions themselves
289289
**/
290290
export const COLUMN_NESTED_OR_OBJ_OF_FUNCTIONS = {
291-
filterParams: 1,
292291
cellRendererParams: 1,
293292
cellEditorParams: 1,
294293
tooltipComponentParams: 1,
295294
};
296295

296+
/**
297+
* Container objects inside columnDefs that may have other functions
298+
* or may be functions themselves no params passed
299+
**/
300+
export const COLUMN_NESTED_OR_OBJ_OF_FUNCTIONS_NO_PARAMS = {
301+
filterParams: 1,
302+
};
303+
297304
/**
298305
* Container arrays of objects inside columnDefs that may have functions
299306
* inside them, listed in other categories

tests/test_cell_value_changed.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,14 @@ def test_cv001_cell_value_changed_multi(dash_duo):
144144
grid.wait_for_cell_text(0, 0, "South Korea")
145145

146146
# Test single event.
147+
grid.get_cell(0, 1).click()
147148
grid.get_cell(0, 1).send_keys("50")
148149
grid.get_cell(1, 2).click()
149150
dash_duo.wait_for_text_to_equal('#log', "1")
150151

151152
# Test multi event.
152153
grid.get_cell(0, 1).send_keys("20")
153154
grid.get_cell_editing_input(0, 2).send_keys("20")
155+
grid.get_cell(0, 2).click()
154156
grid.get_cell(1, 2).click()
155157
dash_duo.wait_for_text_to_equal('#log', "2")

tests/test_column_state.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"hide": False,
9090
"pinned": None,
9191
"sort": "asc",
92+
"sortType": "default",
9293
"sortIndex": None,
9394
"aggFunc": None,
9495
"rowGroup": False,

tests/test_infinite_scroll.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ def infinite_scroll(request):
152152
grid.get_header_cell(0).click()
153153
grid.wait_for_cell_text(0, 0, "9999")
154154
grid.get_header_cell(1).click()
155-
grid.wait_for_cell_text(1, 0, "3600")
155+
grid.wait_for_cell_text(0, 1, "0-0-0")
156156
grid.get_header_cell(1).click()
157-
grid.wait_for_cell_text(0, 0, "7263")
157+
grid.wait_for_cell_text(0, 1, "4-6-7")
158158

159159

160160
def test_is002_infinite_scroll_styling(dash_duo):

0 commit comments

Comments
 (0)