sdrc-table
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

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
  1. import TableModule in your module ts

    import { TableModule} from 'sdrc-table'
  2. add TableModule to @ngModule imports

    imports: [
        BrowserModule,
        HttpClientModule,
        TableModule
    ]
  3. 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"]
  4. If you have to handle the event on action button, use:

    (onActionButtonClicked)="yourFunction($event)"

Readme

Keywords

none

Package Sidebar

Install

npm i sdrc-table

Weekly Downloads

2

Version

0.0.11

License

MIT

Unpacked Size

434 kB

Total Files

32

Last publish

Collaborators

  • lax2165