-
Notifications
You must be signed in to change notification settings - Fork 53
Options
Robert Hjalmers edited this page Jul 15, 2018
·
10 revisions
Available options:
| Name | Type | Usage | Default | |
|---|---|---|---|---|
| csvDelimiter | string | csv delimiter when exporting to CSV file | ";" | (OPTIONAL) |
| stack | boolean | stack columns on mobile devices and tablets, requires css (included) | false | (OPTIONAL) |
| lazyLoad | boolean | should table lazy load data, more on lazy loading | false | (OPTIONAL) |
| cache | boolean | should table cache data when lazy loading | false | (OPTIONAL) |
| debounceTime | number (ms) | prevent multiple server requests for data when lazy loading by setting a debounce time | 200 | (OPTIONAL) |
| highlightSearch | boolean | should table highlight matched search terms, style using .gt-highlight-search selector | false | (OPTIONAL) |
| rowIndex | string | column object key containing unique row id that will be used instead of auto generated one | auto | (OPTIONAL) |
| rowSelection | boolean | enable row selection (on row click), emits select/deselect event with currently selected rows | false | (OPTIONAL) |
| rowSelectionAllowMultiple | boolean | enable multiple rows to be selected | true | (OPTIONAL) |
| rowExpandAllowMultiple | boolean | enable multiple rows to be expanded | true | (OPTIONAL) |
| rowSelectionInitialState | boolean or function | set initial state for selected rows, true will select all rows by default. Use function to select rows that match a certain criteria, see example. |
false | (OPTIONAL) |
| rowExpandInitialState | boolean or function | set initial state for expanded rows, true will expand all rows by default. Use function to expand rows that match a certain criteria, see select example (expand works in the same way as select). |
false | (OPTIONAL) |
| rowExpandInitialComponent | object | pass component and data (optional) for rowExpandInitialState eg. { component: CustomRowComponent, data: (row) => row.drilldown }
|
(OPTIONAL) | |
| numberOfRows | number | set default value for number of rows to be displayed when table is initiated, set to 0 to display all by default. | 10 | (OPTIONAL) |
| reportColumnWidth | boolean | needs to be set to true for the drilldown component to work, stores column width for each column on the columnWidth object that can be accessed through the component. |
false | (OPTIONAL) |
| allowUnsorted | boolean | set to false to change sort from asc => desc => unsorted => asc to asc => desc => asc. |
true | (OPTIONAL) |
| mutateData | boolean | set to false to make a deep copy of initial data input to prevent mutating the original data objects. |
true | (OPTIONAL) |
<generic-table ... [gtOptions]="{lazy:true, cache: true}"></generic-table>