[ x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/ceolter/ag-grid-aurelia/blob/master/CONTRIBUTING.md#question
Current behavior
defaultColDef on GridOptions doesn't apply when defining columns in html templates using ag-grid-column. If columns are defined in typescript / js on the GridOptions, then the defaults get applied fine.
Expected behavior
defaultColDef on the grid options should apply the properties to the columns if the columns themselves don't define that option. For example, if defaultColDef.editable = false, and the column doesn't define the property, then it should be false. If a column sets editable = true, then only that column will be editable, the rest will be readonly.
Minimal reproduction of the problem with instructions Doesn't work:
<!-- html -->
<ag-grid-aurelia class="ag-theme-bootstrap" grid-options.bind="defaultGridOptions"
row-data.bind="rowData" style="height: 350px;">
<!-- This column should be editable, as it defines the property so should override the default -->
<ag-grid-column header-name="Code" field="code" width.bind="95" editable.bind="true">
</ag-grid-column>
<!-- Shouldn't be editable, doesn't define editable so should pick up the default -->
<ag-grid-column header-name="Description" field="description" width.bind="150">
</ag-grid-column>
</ag-grid-aurelia>
Please tell us about your environment:
Windows 10, VSCode, npm, aurelia-cli
ag-grid-aurelia version: 2.0.X
Tried in both 15 & 16
ag-Grid/ag-Grid-Enterprise version: 2.0.X
N/A
Aurelia version: 2.0.X
1.1.4
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Tested in Chrome & Edge
I'm submitting a ... (check one with "x")
Current behavior defaultColDef on GridOptions doesn't apply when defining columns in html templates using ag-grid-column. If columns are defined in typescript / js on the GridOptions, then the defaults get applied fine.
Expected behavior defaultColDef on the grid options should apply the properties to the columns if the columns themselves don't define that option. For example, if defaultColDef.editable = false, and the column doesn't define the property, then it should be false. If a column sets editable = true, then only that column will be editable, the rest will be readonly.
Minimal reproduction of the problem with instructions Doesn't work:
Works:
Please tell us about your environment: Windows 10, VSCode, npm, aurelia-cli
ag-grid-aurelia version: 2.0.X Tried in both 15 & 16
ag-Grid/ag-Grid-Enterprise version: 2.0.X N/A
Aurelia version: 2.0.X 1.1.4
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] Tested in Chrome & Edge
Language: [all | TypeScript X.X | ES6/7 | ES5] Typescript 2.6.1