From 6513c730fdbea1998ce486f56c39256edcadd425 Mon Sep 17 00:00:00 2001 From: BSd3v Date: Thu, 12 Oct 2023 13:16:19 -0400 Subject: [PATCH 01/13] adding filter to be allowed as a functional component without params --- src/lib/utils/propCategories.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/utils/propCategories.js b/src/lib/utils/propCategories.js index c0f2254e..885c73f6 100644 --- a/src/lib/utils/propCategories.js +++ b/src/lib/utils/propCategories.js @@ -161,6 +161,7 @@ export const GRID_NESTED_FUNCTIONS = { **/ export const COLUMN_MAYBE_FUNCTIONS_NO_PARAMS = { cellEditor: 1, + filter: 1, // Columns: Sort comparator: 1, From 813718014904c026b248b497aa7439452c495ad8 Mon Sep 17 00:00:00 2001 From: BSd3v Date: Thu, 12 Oct 2023 14:21:38 -0400 Subject: [PATCH 02/13] Adding test for custom filter with a custom component --- tests/assets/dashAgGridFunctions.js | 50 +++++++++++++++++++++++- tests/test_custom_filter.py | 59 +++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 1 deletion(-) diff --git a/tests/assets/dashAgGridFunctions.js b/tests/assets/dashAgGridFunctions.js index 6997b250..a4fdcb60 100644 --- a/tests/assets/dashAgGridFunctions.js +++ b/tests/assets/dashAgGridFunctions.js @@ -171,4 +171,52 @@ function monthToComparableNumber(date) { const monthNumber = parseInt(date.split('/')[1]); const dayNumber = parseInt(date.split('/')[0]); return yearNumber * 10000 + monthNumber * 100 + dayNumber; -} \ No newline at end of file +} + +const [useImperativeHandle, useState, useEffect, forwardRef] = [React.useImperativeHandle, React.useState, React.useEffect, React.forwardRef] + +dagfuncs.YearFilter = forwardRef((props, ref) => { + const [year, setYear] = useState('All'); + + useImperativeHandle(ref, () => { + return { + doesFilterPass(params) { + return params.data.year >= 2010; + }, + + isFilterActive() { + return year === '2010' + }, + + // this example isn't using getModel() and setModel(), + // so safe to just leave these empty. don't do this in your code!!! + getModel() { + }, + + setModel() { + } + } + }); + + useEffect(() => { + props.filterChangedCallback() + }, [year]); + + setProps = (props) => { + if (props.value) { + setYear(props.value) + } + } + + return React.createElement( + window.dash_core_components.RadioItems, + { + options:[ + {'label': 'All', 'value': 'All'}, + {'label': 'Since 2010', 'value': '2010'}, + ], + value: year, + setProps + } + ) +}); \ No newline at end of file diff --git a/tests/test_custom_filter.py b/tests/test_custom_filter.py index b2d2da3a..df4691ec 100644 --- a/tests/test_custom_filter.py +++ b/tests/test_custom_filter.py @@ -65,3 +65,62 @@ def test_fi002_custom_filter(dash_duo): grid.set_filter(2, "e") grid.wait_for_cell_text(0, 1, "11-Sault-au-RĂ©collet") grid.wait_for_rendered_rows(8) + +def test_fi003_custom_filter(dash_duo): + app = Dash(__name__) + + df = pd.read_json('https://www.ag-grid.com/example-assets/olympic-winners.json', convert_dates=False) + + rowData = df.to_dict('records') + + columnDefs = [ + {'field': 'age', 'filter': 'agNumberColumnFilter'}, + {'field': 'country', 'minWidth': 150}, + {'field': 'year', 'filter': {'function': 'YearFilter'}}, + { + 'field': 'date', + 'minWidth': 130, + 'filter': 'agDateColumnFilter', + }, + {'field': 'sport'}, + {'field': 'gold', 'filter': 'agNumberColumnFilter'}, + {'field': 'silver', 'filter': 'agNumberColumnFilter'}, + {'field': 'bronze', 'filter': 'agNumberColumnFilter'}, + {'field': 'total', 'filter': 'agNumberColumnFilter'}, + ] + + defaultColDef = { + 'editable': True, + 'sortable': True, + 'flex': 1, + 'minWidth': 100, + 'filter': True, + 'resizable': True, + } + + app.layout = html.Div( + [ + dag.AgGrid( + id="grid", + columnDefs=columnDefs, + rowData=rowData, + defaultColDef=defaultColDef + ), + ] + ) + + dash_duo.start_server(app) + + grid = utils.Grid(dash_duo, "grid") + + grid.wait_for_cell_text(0, 0, "23") + + dash_duo.find_element('.ag-header-cell[aria-colindex="3"] .ag-icon-menu').click() + + dash_duo.find_element('.ag-filter label:nth-child(2)').click() + + grid.wait_for_cell_text(0, 0, "27") + + dash_duo.find_element('.ag-filter label:nth-child(1)').click() + + grid.wait_for_cell_text(0, 0, "23") From eaba3cf424a32f3f6907da1de54458fc0be825d7 Mon Sep 17 00:00:00 2001 From: BSd3v <82055130+BSd3v@users.noreply.github.com> Date: Fri, 13 Oct 2023 09:50:58 -0400 Subject: [PATCH 03/13] Update tests/assets/dashAgGridFunctions.js Co-authored-by: Alex Johnson --- tests/assets/dashAgGridFunctions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/assets/dashAgGridFunctions.js b/tests/assets/dashAgGridFunctions.js index a4fdcb60..f2251f46 100644 --- a/tests/assets/dashAgGridFunctions.js +++ b/tests/assets/dashAgGridFunctions.js @@ -173,7 +173,7 @@ function monthToComparableNumber(date) { return yearNumber * 10000 + monthNumber * 100 + dayNumber; } -const [useImperativeHandle, useState, useEffect, forwardRef] = [React.useImperativeHandle, React.useState, React.useEffect, React.forwardRef] +const {useImperativeHandle, useState, useEffect, forwardRef} = React; dagfuncs.YearFilter = forwardRef((props, ref) => { const [year, setYear] = useState('All'); From c6aecf936529d82fa4469575279cfdb1de9ede3c Mon Sep 17 00:00:00 2001 From: BSd3v <82055130+BSd3v@users.noreply.github.com> Date: Fri, 13 Oct 2023 10:12:35 -0400 Subject: [PATCH 04/13] Update tests/assets/dashAgGridFunctions.js Co-authored-by: Alex Johnson --- tests/assets/dashAgGridFunctions.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/assets/dashAgGridFunctions.js b/tests/assets/dashAgGridFunctions.js index f2251f46..af60bae7 100644 --- a/tests/assets/dashAgGridFunctions.js +++ b/tests/assets/dashAgGridFunctions.js @@ -175,6 +175,11 @@ function monthToComparableNumber(date) { const {useImperativeHandle, useState, useEffect, forwardRef} = React; +// This example was adapted from https://www.ag-grid.com/react-data-grid/component-filter/ +// The only differences are: +// - React.createElement instead of JSX +// - setProps, which all Dash components use to report user interactions, +// instead of a plain js event handler dagfuncs.YearFilter = forwardRef((props, ref) => { const [year, setYear] = useState('All'); From 769bac9c1143c3913eae164b9b4e6783cc3702aa Mon Sep 17 00:00:00 2001 From: BSd3v <82055130+BSd3v@users.noreply.github.com> Date: Fri, 13 Oct 2023 10:13:17 -0400 Subject: [PATCH 05/13] Update tests/assets/dashAgGridFunctions.js Co-authored-by: Alex Johnson --- tests/assets/dashAgGridFunctions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/assets/dashAgGridFunctions.js b/tests/assets/dashAgGridFunctions.js index af60bae7..d32c5697 100644 --- a/tests/assets/dashAgGridFunctions.js +++ b/tests/assets/dashAgGridFunctions.js @@ -207,9 +207,9 @@ dagfuncs.YearFilter = forwardRef((props, ref) => { props.filterChangedCallback() }, [year]); - setProps = (props) => { - if (props.value) { - setYear(props.value) + setProps = ({value}) => { + if (value) { + setYear(value) } } From b4fc02c0f247a0b3c20d8520cac54e258b8ca0b4 Mon Sep 17 00:00:00 2001 From: BSd3v Date: Fri, 13 Oct 2023 11:25:28 -0400 Subject: [PATCH 06/13] adding `popupParent`, `setPopupParent` and `shouldRowBeShipped` as functions added test for setting `popupParent` --- src/lib/utils/propCategories.js | 5 ++ tests/assets/dashAgGridFunctions.js | 115 +++++++++++++++++++++++++++- tests/requirements.txt | 2 + tests/test_popupparent.py | 36 +++++++++ 4 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 tests/test_popupparent.py diff --git a/src/lib/utils/propCategories.js b/src/lib/utils/propCategories.js index 885c73f6..4619cc3f 100644 --- a/src/lib/utils/propCategories.js +++ b/src/lib/utils/propCategories.js @@ -55,6 +55,9 @@ export const GRID_MAYBE_FUNCTIONS = { sendToClipboard: 1, processDataFromClipboard: 1, + // Exporting + shouldRowBeSkipped: 1, + // Filtering isExternalFilterPresent: 1, doesExternalFilterPass: 1, @@ -124,6 +127,8 @@ export const GRID_MAYBE_FUNCTIONS = { **/ export const GRID_MAYBE_FUNCTIONS_NO_PARAMS = { frameworkComponents: 1, + setPopupParent: 1, + popupParent: 1, }; /** diff --git a/tests/assets/dashAgGridFunctions.js b/tests/assets/dashAgGridFunctions.js index d32c5697..2cb75904 100644 --- a/tests/assets/dashAgGridFunctions.js +++ b/tests/assets/dashAgGridFunctions.js @@ -224,4 +224,117 @@ dagfuncs.YearFilter = forwardRef((props, ref) => { setProps } ) -}); \ No newline at end of file +}); + +dagfuncs.setBody = () => { + return document.querySelector('body') +} + +// cell editor custom component - dmc.Select +dagfuncs.DMC_Select = class { + // gets called once before the renderer is used + init(params) { + // create the cell + this.params = params; + + // function for when Dash is trying to send props back to the component / server + var setProps = (props) => { + if (typeof props.value != typeof undefined) { + // updates the value of the editor + this.value = props.value; + + // re-enables keyboard event + delete params.colDef.suppressKeyboardEvent; + + // tells the grid to stop editing the cell + params.api.stopEditing(); + + // sets focus back to the grid's previously active cell + this.prevFocus.focus(); + } + }; + this.eInput = document.createElement('div'); + + // renders component into the editor element + ReactDOM.render( + React.createElement(window.dash_mantine_components.Select, { + data: params.options, + value: params.value, + setProps, + style: {width: params.column.actualWidth-2, ...params.style}, + className: params.className, + clearable: params.clearable, + searchable: params.searchable || true, + creatable: params.creatable, + debounce: params.debounce, + disabled: params.disabled, + filterDataOnExactSearchMatch: + params.filterDataOnExactSearchMatch, + limit: params.limit, + maxDropdownHeight: params.maxDropdownHeight, + nothingFound: params.nothingFound, + placeholder: params.placeholder, + required: params.required, + searchValue: params.searchValue, + shadow: params.shadow, + size: params.size, + styles: params.styles, + switchDirectionOnFlip: params.switchDirectionOnFlip, + variant: params.variant, + }), + this.eInput + ); + + // allows focus event + this.eInput.tabIndex = '0'; + + // sets editor value to the value from the cell + this.value = params.value; + } + + // gets called once when grid ready to insert the element + getGui() { + return this.eInput; + } + + focusChild() { + // needed to delay and allow the component to render + setTimeout(() => { + var inp = this.eInput.getElementsByClassName( + 'mantine-Select-input' + )[0]; + inp.tabIndex = '1'; + + // disables keyboard event + this.params.colDef.suppressKeyboardEvent = (params) => { + const gridShouldDoNothing = params.editing; + return gridShouldDoNothing; + }; + // shows dropdown options + inp.focus(); + }, 100); + } + + // focus and select can be done after the gui is attached + afterGuiAttached() { + // stores the active cell + this.prevFocus = document.activeElement; + + // adds event listener to trigger event to go into dash component + this.eInput.addEventListener('focus', this.focusChild()); + + // triggers focus event + this.eInput.focus(); + } + + // returns the new value after editing + getValue() { + return this.value; + } + + // any cleanup we need to be done here + destroy() { + // sets focus back to the grid's previously active cell + this.prevFocus.focus(); + } +}; \ No newline at end of file diff --git a/tests/requirements.txt b/tests/requirements.txt index 1f39e13d..95128001 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -3,3 +3,5 @@ # pip install -r requirements.txt dash[ci,dev,testing]>=2.0 + +dash_mantine_components=0.12.1 diff --git a/tests/test_popupparent.py b/tests/test_popupparent.py new file mode 100644 index 00000000..52fb2558 --- /dev/null +++ b/tests/test_popupparent.py @@ -0,0 +1,36 @@ +import dash_ag_grid as dag +from dash import Dash, html, dcc +from . import utils +import time +import dash_mantine_components + + +def test_pp001_popupParent(dash_duo): + app = Dash(__name__) + + app.layout = html.Div( + [ + dag.AgGrid( + rowData=[{'cities': ''}, {'cities': 'dallas'}, {'cities': 'houston'}], + columnDefs=[{'field': 'cities', 'cellEditor': {'function': 'DMC_Select'}, + 'cellEditorParams': {'options': ['dallas', 'houston']}, + 'cellEditorPopup': True, 'editable': True}], + style={'resize': 'both', 'overflow': 'auto'}, + dashGridOptions={'popupParent': {'function': 'setBody()'}}, + id='grid' + ) + ], + + ) + + dash_duo.start_server(app) + + grid = utils.Grid(dash_duo, "grid") + + grid.wait_for_cell_text(0, 0, "") + + ### testing animations + action = utils.ActionChains(dash_duo.driver) + action.double_click(grid.get_cell(0, 0)).perform() + + dash_duo.find_element('body > .ag-popup') From cd55805763ef054b255b44dee1f8b550bcc9cbb5 Mon Sep 17 00:00:00 2001 From: BSd3v Date: Fri, 13 Oct 2023 11:27:20 -0400 Subject: [PATCH 07/13] fixing typo --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 95128001..be188069 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -4,4 +4,4 @@ dash[ci,dev,testing]>=2.0 -dash_mantine_components=0.12.1 +dash_mantine_components==0.12.1 From 28a9a18fd207d73aa57f3e4c7bde44df9c7b28eb Mon Sep 17 00:00:00 2001 From: BSd3v Date: Fri, 13 Oct 2023 12:13:43 -0400 Subject: [PATCH 08/13] Adjusting `csvExportParams` and `defaultCsvExportParams` to be iterated through to allow for functions to be parsed --- src/lib/fragments/AgGrid.react.js | 4 +++- src/lib/utils/propCategories.js | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/fragments/AgGrid.react.js b/src/lib/fragments/AgGrid.react.js index fc153466..5eb2c2cc 100644 --- a/src/lib/fragments/AgGrid.react.js +++ b/src/lib/fragments/AgGrid.react.js @@ -1076,7 +1076,9 @@ export default class DashAgGrid extends Component { if (!this.state.gridApi) { return; } - this.state.gridApi.exportDataAsCsv(csvExportParams); + this.state.gridApi.exportDataAsCsv( + this.convertAllProps(csvExportParams) + ); if (reset) { this.props.setProps({ exportDataAsCsv: false, diff --git a/src/lib/utils/propCategories.js b/src/lib/utils/propCategories.js index 4619cc3f..94d99587 100644 --- a/src/lib/utils/propCategories.js +++ b/src/lib/utils/propCategories.js @@ -56,7 +56,12 @@ export const GRID_MAYBE_FUNCTIONS = { processDataFromClipboard: 1, // Exporting + getCustomContentBelowRow: 1, shouldRowBeSkipped: 1, + processCellCallback: 1, + processHeaderCallback: 1, + processGroupHeaderCallback: 1, + processRowGroupCallback: 1, // Filtering isExternalFilterPresent: 1, @@ -156,6 +161,8 @@ export const GRID_COLUMN_CONTAINERS = { export const GRID_NESTED_FUNCTIONS = { detailCellRendererParams: 1, detailGridOptions: 1, + csvExportParams: 1, + defaultCsvExportParams: 1, }; /** From f1f6c46f5ee49a825cfe38f654004106078e5c9e Mon Sep 17 00:00:00 2001 From: BSd3v Date: Fri, 13 Oct 2023 12:20:31 -0400 Subject: [PATCH 09/13] updating test to find the mantine select component --- tests/test_popupparent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_popupparent.py b/tests/test_popupparent.py index 52fb2558..1f3a7200 100644 --- a/tests/test_popupparent.py +++ b/tests/test_popupparent.py @@ -33,4 +33,4 @@ def test_pp001_popupParent(dash_duo): action = utils.ActionChains(dash_duo.driver) action.double_click(grid.get_cell(0, 0)).perform() - dash_duo.find_element('body > .ag-popup') + dash_duo.find_element('body > .ag-popup .mantine-Select-input') From 4bcb4a23bad0375d09e3a7c7f56fcc568e10234a Mon Sep 17 00:00:00 2001 From: BSd3v Date: Fri, 13 Oct 2023 13:08:02 -0400 Subject: [PATCH 10/13] adding `isRowMaster` for a function and a test added `getContextMenuItems` as a function, pending test --- src/lib/utils/propCategories.js | 2 + tests/test_is_row_master.py | 138 ++++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 tests/test_is_row_master.py diff --git a/src/lib/utils/propCategories.js b/src/lib/utils/propCategories.js index 94d99587..96335bae 100644 --- a/src/lib/utils/propCategories.js +++ b/src/lib/utils/propCategories.js @@ -46,6 +46,7 @@ export const GRID_MAYBE_FUNCTIONS = { // Accessories getMainMenuItems: 1, postProcessPopup: 1, + getContextMenuItems: 1, // Clipboard processCellForClipboard: 1, @@ -82,6 +83,7 @@ export const GRID_MAYBE_FUNCTIONS = { // Miscellaneous getDocument: 1, + isRowMaster: 1, // Pagination paginationNumberFormatter: 1, diff --git a/tests/test_is_row_master.py b/tests/test_is_row_master.py new file mode 100644 index 00000000..c6d8658c --- /dev/null +++ b/tests/test_is_row_master.py @@ -0,0 +1,138 @@ +""" +Nested tables. +""" + +import dash_ag_grid as dag +import dash +from dash import Input, Output, html, dcc, Dash +from . import utils +from dash.testing.wait import until +import time + + +def test_rm001_row_master(dash_duo): + app = Dash(__name__) + + masterColumnDefs = [ + { + "headerName": "Country", + "field": "country", + "cellRenderer": "agGroupCellRenderer", + }, + {"headerName": "Region", "field": "region"}, + {"headerName": "Population", "field": "population"}, + ] + detailColumnDefs = [ + {"headerName": "City", "field": "city"}, + {"headerName": "Pop. (City proper)", "field": "population_city"}, + {"headerName": "Pop. (Metro area)", "field": "population_metro"}, + ] + rowData = [ + { + "country": "China", + "region": "Asia", + "population": 1411778724, + "cities": [ + {"city": "Shanghai", "population_city": 24870895, "population_metro": "NA"}, + {"city": "Beijing", "population_city": 21893095, "population_metro": "NA"}, + { + "city": "Chongqing", + "population_city": 32054159, + "population_metro": "NA", + }, + ], + }, + { + "country": "India", + "region": "Asia", + "population": 1383524897, + "cities": [ + { + "city": "Delhi", + "population_city": 16753235, + "population_metro": 29000000, + }, + { + "city": "Mumbai", + "population_city": 12478447, + "population_metro": 24400000, + }, + { + "city": "Kolkata", + "population_city": 4496694, + "population_metro": 14035959, + }, + ], + }, + { + "country": "United States", + "region": "Americas", + "population": 332593407, + "cities": [ + { + "city": "New York", + "population_city": 8398748, + "population_metro": 19303808, + }, + { + "city": "Los Angeles", + "population_city": 3990456, + "population_metro": 13291486, + }, + { + "city": "Chicago", + "population_city": 2746388, + "population_metro": 9618502, + }, + ], + }, + { + "country": "Indonesia", + "region": "Asia", + "population": 271350000, + "cities": [ + { + "city": "Jakarta", + "population_city": 10154134, + "population_metro": 33430285, + }, + ], + }, + ] + + app.layout = html.Div( + [ + dag.AgGrid( + id="grid", + enableEnterpriseModules=True, + columnDefs=masterColumnDefs, + rowData=rowData, + columnSize="sizeToFit", + masterDetail=True, + detailCellRendererParams={ + "detailGridOptions": { + "columnDefs": detailColumnDefs, + }, + "detailColName": "cities", + "suppressCallback": True, + }, + dashGridOptions={"detailRowAutoHeight": True, + 'isRowMaster': {'function': 'params ? params.country == "China" : false'}}, + ), + ] + ) + + dash_duo.start_server(app) + + grid = utils.Grid(dash_duo, "grid") + grid.wait_for_cell_text(0, 0, "China") + grid.get_cell_expandable(0, 0) + + try: + grid.get_cell_expandable(1, 0) + ### expandable row was found on India + assert False + except: + ### expandable row was not found on India + assert True + From d0c6be24498b292b8cd059c502be2f8b764a2e79 Mon Sep 17 00:00:00 2001 From: BSd3v Date: Fri, 13 Oct 2023 13:36:08 -0400 Subject: [PATCH 11/13] adding test for `getContextMenuItems` --- tests/assets/dashAgGridFunctions.js | 19 +++++++- tests/test_context_menu.py | 68 +++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 tests/test_context_menu.py diff --git a/tests/assets/dashAgGridFunctions.js b/tests/assets/dashAgGridFunctions.js index 2cb75904..8689171f 100644 --- a/tests/assets/dashAgGridFunctions.js +++ b/tests/assets/dashAgGridFunctions.js @@ -337,4 +337,21 @@ dagfuncs.DMC_Select = class { // sets focus back to the grid's previously active cell this.prevFocus.focus(); } -}; \ No newline at end of file +}; + +dagfuncs.contextTest = (params) => { + var result = [ + { + // custom item + name: 'Alert ' + params.value, + action: () => { + window.alert('Alerting about ' + params.value); + }, + cssClasses: ['redFont', 'bold'], + }, + 'copy', + 'separator', + 'chartRange', + ]; + return result; +}; diff --git a/tests/test_context_menu.py b/tests/test_context_menu.py new file mode 100644 index 00000000..746faf25 --- /dev/null +++ b/tests/test_context_menu.py @@ -0,0 +1,68 @@ +import dash_ag_grid as dag +from dash import Dash, html, dcc +from . import utils +import time +import dash_mantine_components + +def test_cm001_context_menu(dash_duo): + app = Dash(__name__) + + masterColumnDefs = [ + { + "headerName": "Country", + "field": "country", + }, + {"headerName": "Region", "field": "region"}, + {"headerName": "Population", "field": "population"}, + ] + rowData = [ + { + "country": "China", + "region": "Asia", + "population": 1411778724, + }, + { + "country": "India", + "region": "Asia", + "population": 1383524897, + }, + { + "country": "United States", + "region": "Americas", + "population": 332593407, + }, + { + "country": "Indonesia", + "region": "Asia", + "population": 271350000, + }, + ] + + app.layout = html.Div( + [ + dag.AgGrid( + id="grid", + enableEnterpriseModules=True, + columnDefs=masterColumnDefs, + rowData=rowData, + columnSize="sizeToFit", + dashGridOptions={ + 'getContextMenuItems': {'function': 'contextTest(params)'}, + 'popupParent': {'function': 'setBody()'} + }, + ), + ] + ) + + dash_duo.start_server(app) + + grid = utils.Grid(dash_duo, "grid") + + grid.wait_for_cell_text(0, 0, "China") + + ### testing animations + action = utils.ActionChains(dash_duo.driver) + action.context_click(grid.get_cell(0, 0)).perform() + dash_duo.find_element('body > .ag-popup') + + assert dash_duo.find_element('.ag-popup .ag-menu-option-part.ag-menu-option-text').text == 'Alert China' \ No newline at end of file From 2239b8fded19222e04bbd2d3a5bc7a3600d681ad Mon Sep 17 00:00:00 2001 From: BSd3v Date: Fri, 13 Oct 2023 13:48:34 -0400 Subject: [PATCH 12/13] updating changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfb1076c..00c01288 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,15 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D ## [Unreleased] +### Added +- [#243](https://github.com/plotly/dash-ag-grid/pull/243) Added function support for: + - `getContextMenuItems`, `isRowMaster`, `setPopupParent`, `popupParent`, `filter` + - iterate through `csvExportParams` and `defaultCsvExportParams` for functions: + - `getCustomContextBelowRow`, `shouldRowBeSkipped`, `processCellCallback`, `processHeaderCallback`, `processGroupHeaderCallback`, `processRowGroupCallback` + ### Fixed - [#237](https://github.com/plotly/dash-ag-grid/pull/237) Fixed issue with grid components not being passed down to the detail grids +- [#232](https://github.com/plotly/dash-ag-grid/pull/232) Fixed height style to unassign automatically if `domLayout` = 'autoHeight', addresses [#231](https://github.com/plotly/dash-ag-grid/issue/231) ## [2.3.0] - 2023-07-27 From 323dd07315ed9e41f092f617b51cf07829364076 Mon Sep 17 00:00:00 2001 From: BSd3v Date: Fri, 13 Oct 2023 13:49:05 -0400 Subject: [PATCH 13/13] fixing typo in link --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00c01288..1d4c043a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D ### Fixed - [#237](https://github.com/plotly/dash-ag-grid/pull/237) Fixed issue with grid components not being passed down to the detail grids -- [#232](https://github.com/plotly/dash-ag-grid/pull/232) Fixed height style to unassign automatically if `domLayout` = 'autoHeight', addresses [#231](https://github.com/plotly/dash-ag-grid/issue/231) +- [#232](https://github.com/plotly/dash-ag-grid/pull/232) Fixed height style to unassign automatically if `domLayout` = 'autoHeight', addresses [#231](https://github.com/plotly/dash-ag-grid/issues/231) ## [2.3.0] - 2023-07-27