Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Commit a2743f9

Browse files
NMinhNguyenseanlandsman
authored andcommitted
AG-1868 Remove dependency on react-dom-factories in ag-grid-react
1 parent d9724f7 commit a2743f9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src-examples/richGridDeclarativeExample/RichGridDeclarativeExample.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ export default class RichGridDeclarativeExample extends Component {
7777

7878
dobFilter = () => {
7979
let dateFilterComponent = this.api.getFilterInstance('dob');
80-
dateFilterComponent.setFilterType('equals');
81-
dateFilterComponent.setDateFrom('2000-01-01');
80+
dateFilterComponent.setModel({
81+
type: 'equals',
82+
dateFrom: '2000-01-01'
83+
});
8284

8385
// as the date filter is a React component, and its using setState internally, we need
8486
// to allow time for the state to be set (as setState is an async operation)
@@ -194,7 +196,7 @@ export default class RichGridDeclarativeExample extends Component {
194196
<AgGridColumn headerName="Employee" headerGroupComponentFramework={HeaderGroupComponent}>
195197
<AgGridColumn field="name" width={150} enableRowGroup enablePivot pinned editable cellEditorFramework={NameCellEditor}></AgGridColumn>
196198
<AgGridColumn field="country" width={150} enableRowGroup enablePivot pinned editable cellRenderer={RichGridDeclarativeExample.countryCellRenderer} filterParams={{cellRenderer: RichGridDeclarativeExample.countryCellRenderer, cellHeight:20}}></AgGridColumn>
197-
<AgGridColumn field="dob" width={145} headerName="DOB" filter="date" pinned columnGroupShow="open" cellRenderer={RichGridDeclarativeExample.dateCellRenderer}></AgGridColumn>
199+
<AgGridColumn field="dob" width={145} headerName="DOB" filter="agDateColumnFilter" pinned columnGroupShow="open" cellRenderer={RichGridDeclarativeExample.dateCellRenderer}></AgGridColumn>
198200
</AgGridColumn>
199201
<AgGridColumn headerName="IT Skills">
200202
<AgGridColumn field="skills" width={120} enableRowGroup enablePivot suppressSorting cellRendererFramework={SkillsCellRenderer} filterFramework={SkillsFilter}></AgGridColumn>

0 commit comments

Comments
 (0)