AG-644 Refactor of sorting, filtering and resizing properties

This commit is contained in:
Sean Landsman
2019-01-08 16:46:07 +00:00
parent a3a1d74b88
commit 3f0fe9f899
4 changed files with 18 additions and 12 deletions

View File

@@ -179,12 +179,9 @@ export default class RichGridDeclarativeExample extends Component {
rowData={this.state.rowData}
// no binding, just providing hard coded strings for the properties
// boolean properties will default to true if provided (ie enableColResize => enableColResize="true")
// boolean properties will default to true if provided (ie suppressRowClickSelection => suppressRowClickSelection="true")
suppressRowClickSelection
rowSelection="multiple"
enableColResize
enableSorting
enableFilter
floatingFilter
groupHeaders
@@ -193,6 +190,9 @@ export default class RichGridDeclarativeExample extends Component {
// setting default column properties
defaultColDef={{
resizable: true,
sortable: true,
filter: true,
headerComponentFramework: SortableHeaderComponent,
headerComponentParams: {
menuIcon: 'fa-bars'
@@ -200,7 +200,7 @@ export default class RichGridDeclarativeExample extends Component {
}}
>
<AgGridColumn headerName="#" width={30}
checkboxSelection suppressSorting suppressMenu suppressFilter pinned>
checkboxSelection sortable={false} suppressMenu filter={false} pinned>
</AgGridColumn>
<AgGridColumn headerName="Employee" headerGroupComponentFramework={HeaderGroupComponent}>
<AgGridColumn field="name" width={150}
@@ -218,10 +218,10 @@ export default class RichGridDeclarativeExample extends Component {
cellRenderer={RichGridDeclarativeExample.dateCellRenderer}/>
</AgGridColumn>
<AgGridColumn headerName="IT Skills">
<AgGridColumn field="skills" width={120} enableRowGroup enablePivot suppressSorting
<AgGridColumn field="skills" width={120} enableRowGroup enablePivot sortable={false}
cellRendererFramework={SkillsCellRenderer}
filterFramework={SkillsFilter}/>
<AgGridColumn field="proficiency" width={135} enableValue
<AgGridColumn field="proficiency" width={160} enableValue
cellRendererFramework={ProficiencyCellRenderer}
filterFramework={ProficiencyFilter}/>
</AgGridColumn>

View File

@@ -63,8 +63,10 @@ class FxQuoteMatrix extends Component {
<AgGridReact
// properties
columnDefs={this.state.columnDefs}
enableSorting="false"
enableFilter="false"
defaultColDef={{
sortable: false,
filter: false
}}
// callbacks
getRowNodeId={this.getRowNodeId}

View File

@@ -155,7 +155,9 @@ export default class extends Component {
<AgGridReact
// properties
columnDefs={this.state.columnDefs}
enableSorting="true"
defaultColDef={{
sortable: true
}}
rowSelection="single"
// callbacks

View File

@@ -67,8 +67,10 @@ class TopMoversGrid extends Component {
// properties
columnDefs={this.state.columnDefs}
rowData={this.props.rowData}
enableSorting
enableFilter="false"
defaultColDef={{
sortable: true,
filter: false
}}
animateRows
deltaRowDataMode
getRowNodeId={this.getRowNodeId}