Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a5e15c8cd | ||
|
|
bf18305c9a | ||
|
|
aef9c596b6 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ag-grid-react-example",
|
"name": "ag-grid-react-example",
|
||||||
"version": "23.0.0",
|
"version": "23.0.2",
|
||||||
"description": "Example Reach applicaiton using ag-Grid.",
|
"description": "Example Reach applicaiton using ag-Grid.",
|
||||||
"main": "dist/ag-grid-react-example.js",
|
"main": "dist/ag-grid-react-example.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -75,23 +75,25 @@ export default class RichGridDeclarativeExample extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
invokeSkillsFilterMethod = () => {
|
invokeSkillsFilterMethod = () => {
|
||||||
let skillsFilter = this.api.getFilterInstance('skills');
|
this.api.getFilterInstance('skills', (instance) => {
|
||||||
let componentInstance = skillsFilter.getFrameworkComponentInstance();
|
let componentInstance = instance.getFrameworkComponentInstance();
|
||||||
componentInstance.helloFromSkillsFilter();
|
componentInstance.helloFromSkillsFilter();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
dobFilter = () => {
|
dobFilter = () => {
|
||||||
let dateFilterComponent = this.api.getFilterInstance('dob');
|
this.api.getFilterInstance('dob', (dateFilterComponent) => {
|
||||||
dateFilterComponent.setModel({
|
dateFilterComponent.setModel({
|
||||||
type: 'equals',
|
type: 'equals',
|
||||||
dateFrom: '2000-01-01'
|
dateFrom: '2000-01-01'
|
||||||
});
|
});
|
||||||
|
|
||||||
// as the date filter is a React component, and its using setState internally, we need
|
// as the date filter is a React component, and its using setState internally, we need
|
||||||
// to allow time for the state to be set (as setState is an async operation)
|
// to allow time for the state to be set (as setState is an async operation)
|
||||||
// simply wait for the next tick
|
// simply wait for the next tick
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.api.onFilterChanged();
|
this.api.onFilterChanged();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -219,7 +221,7 @@ export default class RichGridDeclarativeExample extends Component {
|
|||||||
menuIcon: 'fa-bars'
|
menuIcon: 'fa-bars'
|
||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
<AgGridColumn headerName="#" width={30}
|
<AgGridColumn headerName="#" width={40}
|
||||||
checkboxSelection sortable={false} suppressMenu filter={false} pinned>
|
checkboxSelection sortable={false} suppressMenu filter={false} pinned>
|
||||||
</AgGridColumn>
|
</AgGridColumn>
|
||||||
<AgGridColumn headerName="Employee" headerGroupComponentFramework={HeaderGroupComponent}>
|
<AgGridColumn headerName="Employee" headerGroupComponentFramework={HeaderGroupComponent}>
|
||||||
|
|||||||
Reference in New Issue
Block a user