Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d19c461847 | ||
|
|
f2b515af7f | ||
|
|
5561283927 | ||
|
|
86c353eaa9 | ||
|
|
67fdecbe51 | ||
|
|
66580db71c | ||
|
|
aafdfc1a62 | ||
|
|
3a9e138d28 | ||
|
|
6eb9fdf572 | ||
|
|
25962ee140 | ||
|
|
b26dfb5b82 | ||
|
|
1d59920479 | ||
|
|
6d3b5d8bd7 | ||
|
|
6e31d0f067 | ||
|
|
a49a05f3ed | ||
|
|
16f820c4f7 | ||
|
|
839457ceda | ||
|
|
cb6dbfb186 | ||
|
|
f81d48b3d4 | ||
|
|
06fa3f01fd | ||
|
|
d15bb746cd |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ag-grid-react-example",
|
||||
"version": "23.0.2",
|
||||
"version": "23.0.0",
|
||||
"description": "Example Reach applicaiton using ag-Grid.",
|
||||
"main": "dist/ag-grid-react-example.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta charset="utf-8">
|
||||
<script type="text/javascript" src="../dist/react-examples.js" charset="utf-8"></script>
|
||||
<!-- Example uses font awesome icons -->
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
|
||||
@@ -31,10 +31,10 @@ export default class RichGridDeclarativeExample extends Component {
|
||||
icons: {
|
||||
columnRemoveFromGroup: '<i class="fa fa-times"/>',
|
||||
filter: '<i class="fa fa-filter"/>',
|
||||
sortAscending: '<i class="fa fa-long-arrow-down"/>',
|
||||
sortDescending: '<i class="fa fa-long-arrow-up"/>',
|
||||
groupExpanded: '<i class="fa fa-minus-square-o"/>',
|
||||
groupContracted: '<i class="fa fa-plus-square-o"/>'
|
||||
sortAscending: '<i class="fa fa-long-arrow-alt-down"/>',
|
||||
sortDescending: '<i class="fa fa-long-arrow-alt-up"/>',
|
||||
groupExpanded: '<i class="far fa-minus-square"/>',
|
||||
groupContracted: '<i class="far fa-plus-square"/>'
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -75,25 +75,23 @@ export default class RichGridDeclarativeExample extends Component {
|
||||
};
|
||||
|
||||
invokeSkillsFilterMethod = () => {
|
||||
this.api.getFilterInstance('skills', (instance) => {
|
||||
let componentInstance = instance.getFrameworkComponentInstance();
|
||||
componentInstance.helloFromSkillsFilter();
|
||||
});
|
||||
let skillsFilter = this.api.getFilterInstance('skills');
|
||||
let componentInstance = skillsFilter.getFrameworkComponentInstance();
|
||||
componentInstance.helloFromSkillsFilter();
|
||||
};
|
||||
|
||||
dobFilter = () => {
|
||||
this.api.getFilterInstance('dob', (dateFilterComponent) => {
|
||||
dateFilterComponent.setModel({
|
||||
type: 'equals',
|
||||
dateFrom: '2000-01-01'
|
||||
});
|
||||
let dateFilterComponent = this.api.getFilterInstance('dob');
|
||||
dateFilterComponent.setModel({
|
||||
type: 'equals',
|
||||
dateFrom: '2000-01-01'
|
||||
});
|
||||
|
||||
// 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)
|
||||
// simply wait for the next tick
|
||||
setTimeout(() => {
|
||||
this.api.onFilterChanged();
|
||||
});
|
||||
// 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)
|
||||
// simply wait for the next tick
|
||||
setTimeout(() => {
|
||||
this.api.onFilterChanged();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -221,7 +219,7 @@ export default class RichGridDeclarativeExample extends Component {
|
||||
menuIcon: 'fa-bars'
|
||||
}
|
||||
}}>
|
||||
<AgGridColumn headerName="#" width={40}
|
||||
<AgGridColumn headerName="#" width={30}
|
||||
checkboxSelection sortable={false} suppressMenu filter={false} pinned>
|
||||
</AgGridColumn>
|
||||
<AgGridColumn headerName="Employee" headerGroupComponentFramework={HeaderGroupComponent}>
|
||||
|
||||
@@ -30,10 +30,10 @@ export default class SortableHeaderComponent extends React.Component {
|
||||
|
||||
sortElements.push(<div key={`up${this.props.displayName}`} className={downArrowClass}
|
||||
onClick={this.onSortRequested.bind(this, 'desc')}><i
|
||||
className="fa fa-long-arrow-down"/></div>);
|
||||
className="fa fa-long-arrow-alt-down"/></div>);
|
||||
sortElements.push(<div key={`down${this.props.displayName}`} className={upArrowClass}
|
||||
onClick={this.onSortRequested.bind(this, 'asc')}><i
|
||||
className="fa fa-long-arrow-up"/></div>);
|
||||
className="fa fa-long-arrow-alt-up"/></div>);
|
||||
sortElements.push(<div key={`minus${this.props.displayName}`} className={removeArrowClass}
|
||||
onClick={this.onSortRequested.bind(this, '')}><i
|
||||
className="fa fa-times"/></div>)
|
||||
|
||||
Reference in New Issue
Block a user