0.0.11 • Published 5 years ago
sdrc-table v0.0.11
This package is developed by SDRC UI team with all the basic features those a table basically has. Its peer dependencies are bootstrap, jQuery and Fontawesome. Please follow the installation steps.
Steps to use SDRC Table 1. Install jQuery, fontawesome and bootstrap
npm i @progress/kendo-drawing @progress/kendo-angular-pdf-export ng2-search-filter ngx-pagination save-as
npm i sdrc-table
import TableModule in your module ts
import { TableModule} from 'sdrc-table'
add TableModule to @ngModule imports
imports: [ BrowserModule, HttpClientModule, TableModule ]
Use sdrc-table tag to get the table view
<sdrc-table [id]="'tab1'" [rowData]="tableData" [columnData]="tableColumns" [maxTableHeight]="'600px'" [sorting]="true" [sortExcludeColumn]="['action', 'rowId']" [isPaginate]="true" [itemsPerPage]="15" [headerFixed]="true" [searchBox]="true" [downloadPdf]="true" [downloadExcel]="true"></sdrc-table>
format of rowData and columnData should be like:
tableData = [{ name: "xyz", age: 0, action:[{ "controlType" : "button", "type": "submit", "value" :"Edit", "class" : "btn btn-submit", "icon" : "fa-edit" }] }] tableColumns = ["name", "age", "action"]
If you have to handle the event on action button, use:
(onActionButtonClicked)="yourFunction($event)"