The default constructor
The name of the toolbar template containing actions
An array of items to display for table columns
The table config containing component properties
The ngx-datatable config containing component properties
The name of the template used with expanding rows
The name of the template used with group headers
The event emitted when an action (e.g., button, kebab, etc.) has been selected -- requires toolbarConfig
The ngx-datatable event emitted when a cell or row was focused via keyboard or mouse click
The ngx-datatable event emitted when a row detail row was toggled
Not applicable with pfng-table useExpandRows
The event emitted when a row has been dropped
The event emitted when a filter has been changed -- requires toolbarConfig
The event emitted when a field menu option is selected -- requires toolbarConfig
The event emitted when a filter has been saved -- requires toolbarConfig
The event emitted when the user types ahead in the query input field -- requires toolbarConfig
The ngx-datatable event emitted when a row detail row was toggled
Not applicable with pfng-table paginationConfig
The Event is emitted when Page Number is Changed -- requires paginationConfig
Not applicable with ngx-datatable page event
The Event is emitted when Page Size is changed -- requires paginationConfig
Not applicable with ngx-datatable page event
The ngx-datatable event emitted when columns are re-ordered
The ngx-datatable event emitted when a column is resized
The ngx-datatable event emitted when body was scrolled (e.g., when scrollbarV is true)
The ngx-datatable event emitted when a cell or row was selected
Not applicable with pfng-table showCheckbox
The event emitted when an item selection has been changed -- requires showCheckbox
Not applicable with ngx-datatable select event
The ngx-datatable event emitted when a column header is sorted
The event emitted when the sort has changed -- requires toolbarConfig
Not applicable with ngx-datatable sort event
The ngx-datatable event emitted when a context menu is invoked on the table
The event emitted when a view has been selected -- requires toolbarConfig
The ngx-datatable event emitted when a cell or row was focused via keyboard or mouse click
The name of the toolbar template containing views
Returns a flag indicating whether all visible rows are selected
True if all visible rows are selected
Sets a flag indicating whether all visible rows are selected
True if all visible rows are selected
True if all visible rows are selected
Returns the underlying ngx-datatable component
Get the flag indicating table has data, including filtered rows
True is the table has data
Returns the currently selected rows
The selected rows
Sets the currently selected rows
The selected rows
The selected rows
Setup component configuration upon view initialization
Check if the component config has changed
Setup component configuration upon initialization
Generated using TypeDoc
Table component.
In order to use drag and drop, please include the following CSS file from ng2-dragula. For example:
import 'dragula/dist/dragula.css';
For ngx-datatable options, see: https://swimlane.gitbooks.io/ngx-datatable/
Note: The underlying ngx-datatable uses ContentChildren to retrieve DataTableColumnDirective (ngx-datatable-column) tags. As a result of wrapping ngx-datatable, these objects are no longer direct descendents and ContentChildren cannot retrieve them. A fix to ContentChildren may be in the works...
Instead of using ngx-datatable-column, table cells may be defined using templates, provided as the columns cellTemplate property. For example:
this.columns = [{ cellTemplate: this.nameTemplate, prop: 'name', name: 'Name' }]
and
<ng-template #nameTemplate let-row="row"> <span>{{row.name}}</span> </ng-template>
Usage:
// NGX Bootstrap import { BsDropdownConfig, BsDropdownModule } from 'ngx-bootstrap/dropdown'; // NGX Datatable import { NgxDatatableModule } from '@swimlane/ngx-datatable';
@NgModule({ imports: [BsDropdownModule.forRoot(), NgxDatatableModule, TableModule,...], providers: [BsDropdownConfig] }) export class AppModule(){}
Optional: