angular-reactive-table
v0.3.0
Published
import { AngularReactiveTableModule } from 'angular-reactive-table';
Downloads
33
Readme
AngularReactiveTable
Example use
Add AngularReactiveTableModule to your app.module.ts
import { AngularReactiveTableModule } from 'angular-reactive-table';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AngularReactiveTableModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Then add the x-angular-reactive-table to your component
<x-angular-reactive-table (CBScrollEnd)="scrollEnd($event)" (CBSelectAll)="selectAll($event)" (CBSelect)="select($event)" (CBEdit)="test($event)" [config]="table_config" [column]="table_column" [data]="test_data">
Callbacks
CBScrollEnd - Emit when scroll reached end.
CBSelectAll - Emit when you toggle select all checkbox.(returns the row value)
CBSelect - Emit when you toggle select row. (returns the row value)
CBEdit - Emit when you click the edit icon. (returns the row value)
Configs
config - table configuration
enableSelect?: boolean,
minWidth?: string,
defaultWidth?: string
maxWidth: string,
height: number,
tdMinWidth: number,
enableActionColumn?: boolean,
enableEdit?: boolean,
enableDelete?: boolean,
cssClass?: string
column - table column head Array
order: number,
prefix: string, // Important
label: string, // Label of your th
sortable: boolean // Enable sort by column