bk-angular-table
Version:
An Angular 19 table, with pagination, sorting, filter etc.
39 lines (31 loc) • 1.29 kB
Markdown
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.0.
This bk-angular-table plugin adds the ability to generate dynamic angular material tables.
```<bk-angular-table
[]="displayedColumn"
[]="this.data"
(selectedRow$)="onSelectedChange($event)"
(pagination$)="onPagination($event)"
class="bk-table"
columnClass="bk-customer-heading"
>
</bk-angular-table>
```
> DisplayedColumn `you have to pass your title and field for table`
example:-```displayedColumn = [
{ field: 'name', title: 'Name' },
{ field: 'org', title: 'Organization' },
{ field: 'place', title: 'Place' },
{ field: 'code', title: 'Code' },
];```
> `DataSource:`-table data.
> `SelectedRow$`:-SelectedRow$ will retun you selected row.
> `Pagination$:-` If you want to add pagination for this table then you can access current page index using pagination$
> `columnClass` will allow you to adjust table header width
``` import { BkTableModule } from 'bk-angular-table' ```
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.