Ada

Column Types

Configure filterable columns with 5 built-in column types.

Ada supports 5 column types, each with a specific set of filter operators and UI inputs. Column configs are created using the createColumnConfigHelper builder:

import { createColumnConfigHelper } from "@ada/ui/components/data-table";

const col = createColumnConfigHelper<Task>();

Every column requires .id(), .accessor(), .displayName(), .icon(), and must end with .build().

Text

Text columns support string-based filtering with contains, exact match, and empty checks.

col
  .text()
  .id("title")
  .accessor((row) => row.title)
  .displayName("Title")
  .icon(TextAaIcon)
  .build()

Operators

OperatorDescriptionInput
containsCase-insensitive substring matchText input
does not containNegation of containsText input
isExact matchText input
is notNegation of exact matchText input
is emptyNull or empty stringNone
is not emptyNot null and not emptyNone

Text filter values are applied on Enter key press or after a debounce period.

Number

Number columns support comparison and range operators.

col
  .number()
  .id("estimatedHours")
  .accessor((row) => row.estimatedHours)
  .displayName("Est. Hours")
  .icon(HashIcon)
  .min(0)  // optional: minimum value for range
  .max(40) // optional: maximum value for range
  .build()

Operators

OperatorDescriptionInput
isEqual toNumber input
is notNot equal toNumber input
is greater thanGreater thanNumber input
is greater than or equal toGreater than or equalNumber input
is less thanLess thanNumber input
is less than or equal toLess than or equalNumber input
is betweenWithin range (inclusive)Two number inputs
is not betweenOutside rangeTwo number inputs

When switching between single-value and range operators, Ada automatically promotes/demotes the operator (e.g., is becomes is between when a second value is added).

Date

Date columns use a calendar picker for date selection.

col
  .date()
  .id("createdAt")
  .accessor((row) => row.createdAt)
  .displayName("Created At")
  .icon(CalendarIcon)
  .build()

Operators

OperatorDescriptionInput
isExact date matchCalendar picker
is notNot on dateCalendar picker
is afterAfter dateCalendar picker
is beforeBefore dateCalendar picker
is betweenWithin date rangeDate range picker
is not betweenOutside date rangeDate range picker

Date values are applied immediately on calendar selection.

Option

Option columns filter on a single enum/string value. Use this for columns like status, category, or role.

col
  .option()
  .id("priority")
  .accessor((row) => row.priority)
  .displayName("Priority")
  .icon(TagIcon)
  .options([
    { label: "Low", value: "low" },
    { label: "Medium", value: "medium" },
    { label: "High", value: "high" },
    { label: "Critical", value: "critical" },
  ])
  .build()

Operators

OperatorDescriptionInput
isEqual to one valueOption list (single select)
is notNot equal to one valueOption list (single select)
is any ofMatches any of selected valuesOption list (multi select)
is none ofMatches none of selected valuesOption list (multi select)

Option values are applied immediately on checkbox click. When selecting multiple values, the operator automatically promotes from is to is any of.

Options Configuration

Each option can include:

  • label — Display text
  • value — The actual value stored in data
  • icon — Optional icon component or element

Faceted Values

In client mode, Ada automatically computes faceted counts (how many rows match each option). In server mode, you can provide precomputed counts via the facetedOptions property on the ColumnConfig type.

Custom Option Transforms

For columns where the raw data value differs from the display value, use .transformOptionFn():

col
  .option()
  .id("assignee")
  .accessor((row) => row.assignee)
  .displayName("Assignee")
  .icon(UserIcon)
  .transformOptionFn((value) => ({
    label: value.name,
    value: value.id,
    icon: <Avatar src={value.avatar} />,
  }))
  .build()

Custom Ordering

Control the order of options in the filter dropdown with .orderFn():

col
  .option()
  .id("priority")
  .accessor((row) => row.priority)
  .displayName("Priority")
  .icon(TagIcon)
  .orderFn((a, b) => priorityOrder[a] - priorityOrder[b])
  .build()

Multi-Option

Multi-option columns filter on array values (e.g., tags, labels). The column value must be an array.

col
  .multiOption()
  .id("status")
  .accessor((row) => row.status)
  .displayName("Status")
  .icon(StackIcon)
  .options([
    { label: "Todo", value: "todo" },
    { label: "In Progress", value: "in_progress" },
    { label: "Done", value: "done" },
  ])
  .build()

Operators

OperatorDescriptionInput
includeArray contains valueOption list (single)
excludeArray does not contain valueOption list (single)
include any ofArray overlaps with selectedOption list (multi)
include all ofArray contains all selectedOption list (multi)
exclude if any ofArray does not overlap with selectedOption list (multi)
exclude if allArray does not contain all selectedOption list (multi)

Builder Methods

All types

MethodRequiredDescription
.id(value)YesColumn identifier (key from your data type)
.accessor(fn)YesFunction to extract the value from a row
.displayName(value)YesDisplay label in the filter UI
.icon(Component)YesIcon component for the filter UI
.build()YesValidates and returns the final ColumnConfig

Number only

MethodDescription
.min(value)Minimum value for range constraints
.max(value)Maximum value for range constraints

Option / Multi-Option only

MethodDescription
.options(array)Static list of { label, value, icon? } options
.transformOptionFn(fn)Transform raw data values into ColumnOption
.orderFn(fn)Custom sort function for options in the dropdown

On this page