How to use the ngx-easy-table.Event.onOrder function in ngx-easy-table

To help you get started, we’ve selected a few ngx-easy-table examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ssuperczynski / ngx-easy-table / src / app / demo / custom-intable-sort / custom-intable-sort.component.ts View on Github external
eventEmitted($event: { event: string, value: any }): void {
    if ($event.event === Event.onOrder) {
      if ($event.value.key === 'level') {
        this.sortByLevel($event.value.order === 'asc');
      } else if ($event.value.key === 'name') {
        this.sortByLastName($event.value.order === 'asc');
      }
    }
  }
}