AdaptTable for ngx-bootstrap

Filtering in ngx-bootstrap

Declare what a column filters by and the table builds the form: text with its operators, number and date ranges, multi-select checkboxes and a yes/no choice, each using ngx-bootstrap controls.

Filters opens as an anchored popover or as a drawer, with an AND/OR tree at the top for what one row of inputs cannot say. Header funnels filter one column in place, and every active filter shows as a chip that removes itself.

Filter state lives in the versioned URL, so a filtered view is a link someone can send.

The code

import { Component, input } from "@angular/core";
import type { ColumnDef } from "@adapttable/angular";
import { AdaptDataTable } from "@adapttable/ngx-bootstrap";
import { filters } from "@adapttable/ngx-bootstrap/filters";
import { headerFilters } from "@adapttable/ngx-bootstrap/header-filters";

const columns: ColumnDef<Person>[] = [
  { key: "name", filter: "text" },
  { key: "team", filter: { type: "multiSelect", options: "auto" } },
  { key: "budget", filter: "numberRange" },
  { key: "hiredAt", filter: "dateRange" },
];

@Component({
  selector: "app-people",
  imports: [AdaptDataTable],
  template: `
    <adapt-data-table
      [data]="rows()"
      [columns]="columns"
      [rowKey]="rowKey"
      urlKey="f"
      filtersMode="popover"
      [features]="features"
    />
  `,
})
export class People {
  readonly rows = input.required<readonly Person[]>();
  readonly columns = columns;
  readonly rowKey = (row: Person) => row.id;
  readonly features = [filters([]), headerFilters()];
}

Install

# Follow the kit setup guide for compatible peers
pnpm add @adapttable/ngx-bootstrap @adapttable/angular ngx-bootstrap@22.0.0 @angular/forms@^22 rxjs@^7.4.0

The same feature in the other kits

More ngx-bootstrap features

Reference: filtering, filter-tree, url-state. More of this kit: AdaptTable for ngx-bootstrap, or the live demo.