Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p-table #tt class="table"[value]="myList">
- ....
- <tr>
- <th>
- <p-dropdown appendTo="body" *ngSwitchCase="'state'" [options]="states"
- (onChange)="tt.filter($event.value, 'state', 'equals')"></p-dropdown>
- </th>
- </tr>
- ....
- </p-table>
- export class Component implements {
- @ViewChild('tt') tt: DataTable;
- myList: any;
- getList(){
- Promise.resolve(...)
- .then(res => {
- this.myList = res;
- this.tt.filter('created', 'state', 'equals');
- });
- }
- }
Add Comment
Please, Sign In to add comment