Guest User

Untitled

a guest
Feb 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <p-table #tt class="table"[value]="myList">
  2. ....
  3. <tr>
  4. <th>
  5. <p-dropdown appendTo="body" *ngSwitchCase="'state'" [options]="states"
  6. (onChange)="tt.filter($event.value, 'state', 'equals')"></p-dropdown>
  7. </th>
  8. </tr>
  9. ....
  10. </p-table>
  11.  
  12. export class Component implements {
  13. @ViewChild('tt') tt: DataTable;
  14. myList: any;
  15.  
  16. getList(){
  17. Promise.resolve(...)
  18. .then(res => {
  19. this.myList = res;
  20. this.tt.filter('created', 'state', 'equals');
  21. });
  22. }
  23. }
Add Comment
Please, Sign In to add comment