Skip to content

Commit

Permalink
fix: Update igCombo data to export options.
Browse files Browse the repository at this point in the history
  • Loading branch information
IvayloG committed Feb 5, 2018
1 parent 19bd446 commit 0c7eff3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h4>Data Export Mode:&nbsp</h4>
$("#exportOptions").igCombo({
width: "200px",
mode: "dropdown",
dataSource: [{text: "All Rows", value: "allRows"}, {"text":"Expanded Rows", "value":"expandedRows"}],
dataSource: [{"text": "All Rows", "value": "allRows"}, {"text":"Expanded Rows", "value":"expandedRows"}],
textKey : "text",
valueKey: "value"
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default class $(ClassName) extends Component {
</div>
<div>
<IgCombo
id="combo"
width="200px"
mode="dropdown"
dataSource={this.state.keys}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ export default class $(ClassName) extends Component {
super(props);
this.state = {
northwind,
keys:["EmployeeID", "LastName", "Country", "Age", "IsActive", "Company", "RegistererDate"],
columnsToSkip: []
exportOptions:[{"text": "All Rows", "value": "allRows"}, {"text":"Expanded Rows", "value":"expandedRows"}],
exportOption: []
};

this.export = () => {
// export
$.ig.GridExcelExporter.exportGrid($("#hierarchicalGrid"), {
fileName: "igHierarchicalGrid",
worksheetName: 'Sheet1',
columnsToSkip: this.state.columnsToSkip
exportOption: this.state.exportOption
});
}
this.selectionChanged = (ev, ui) => {
this.setState({columnsToSkip: ui.items});
this.setState({exportOption: ui.items[0].data.value});
}
}
render() {
Expand All @@ -51,13 +51,11 @@ export default class $(ClassName) extends Component {
</div>
<div>
<IgCombo
id="combo"
width="200px"
mode="dropdown"
dataSource={this.state.keys}
multiSelection={{
enabled: true,
showCheckboxes: true
}}
responseDataKey="exportOptions"
dataSource={this.state}
selectionChanged={this.selectionChanged}
/>

Expand Down

0 comments on commit 0c7eff3

Please sign in to comment.