How to use the @swimlane/ngx-datatable.SortDirection.desc function in @swimlane/ngx-datatable

To help you get started, we’ve selected a few @swimlane/ngx-datatable 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 ceph / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / prometheus / silence-list / silence-list.component.ts View on Github external
templateUrl: './silence-list.component.html',
  styleUrls: ['./silence-list.component.scss']
})
export class SilenceListComponent implements OnInit {
  silences: AlertmanagerSilence[] = [];
  columns: CdTableColumn[];
  tableActions: CdTableAction[];
  permission: Permission;
  selection = new CdTableSelection();
  modalRef: BsModalRef;
  customCss = {
    'label label-danger': 'active',
    'label label-warning': 'pending',
    'label label-default': 'expired'
  };
  sorts: SortPropDir[] = [{ prop: 'endsAt', dir: SortDirection.desc }];

  constructor(
    private authStorageService: AuthStorageService,
    private i18n: I18n,
    private cdDatePipe: CdDatePipe,
    private prometheusService: PrometheusService,
    private modalService: BsModalService,
    private notificationService: NotificationService,
    private urlBuilder: URLBuilderService,
    private actionLabels: ActionLabelsI18n,
    private succeededLabels: SucceededActionLabelsI18n
  ) {
    this.permission = this.authStorageService.getPermissions().prometheus;
  }

  ngOnInit() {

@swimlane/ngx-datatable

ngx-datatable is an Angular table grid component for presenting large and complex data.

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis