mazdik / ng-mazdik

Angular UI component library
https://mazdik.github.io/ng-mazdik
MIT License
89 stars 34 forks source link

How can i get the updated column list from the datamanager after hiding the columns? #69

Closed xerovit-git closed 4 years ago

xerovit-git commented 4 years ago

We can hide and move the positions of the column inside the action button. But how do we get the updated columns list? Is there any event or subscription that we can use?

mazdik commented 4 years ago

maybe this will help you:

  ngOnInit() {
    const subRowsChanged = this.dataManager.events.rowsChanged$.subscribe((data) => {
      console.log(this.dataManager.preparedColumns);
    });
    this.subscriptions.push(subRowsChanged);
  }
  ngOnDestroy() {
    this.subscriptions.forEach(s => s.unsubscribe());
  }
mazdik commented 4 years ago

dt-column-toggler.component source