Skip to main content

Column filters

Prop enableColumnFilters — engine behaviour, default true.

Guide

When to use it

On by default — per-column filtering (operator-aware: contains, equals, ranges, …), for narrowing by a specific column rather than a global search.

How it works

The engine matches through a bstCondition filter function. Surface the UI with enableColumnFilterRow (an inline filter row) or showFilterBuilder (a panel of condition rows).

Gotchas

  • It's the base other filters build on: enableSetFilter and enableMultiFilter both require it plus enableColumnFilterRow.
  • Move it server-side (manual mode) for very large datasets.

Live example

Example source
import React from 'react'
import { BstTableMui } from '@bloomskill/table-mui'
import type { BstTableColumn } from '@bloomskill/table-engine'
import '@bloomskill/table-engine/styles.css'
type Row = { id: string; name: string; team: string; role: string; score: number }
const seed: Row[] = [
{ id: '1', name: 'Ada Lovelace', team: 'Platform', role: 'Engineer', score: 92 },
{ id: '2', name: 'Alan Turing', team: 'Research', role: 'Scientist', score: 88 },
{ id: '3', name: 'Grace Hopper', team: 'Platform', role: 'Engineer', score: 95 },
{ id: '4', name: 'Katherine J.', team: 'Research', role: 'Analyst', score: 90 },
{ id: '5', name: 'Edsger Dijkstra', team: 'Platform', role: 'Architect', score: 84 },
]
const columns: BstTableColumn<Row>[] = [
{ id: 'name', accessorKey: 'name', header: 'Name' },
{ id: 'team', accessorKey: 'team', header: 'Team' },
{ id: 'role', accessorKey: 'role', header: 'Role' },
{ id: 'score', accessorKey: 'score', header: 'Score', sortFn: 'basic' },
]
export default function App() {
return (
<BstTableMui data={seed} columns={columns} getRowId={(r) => r.id}
enableColumnFilters enableColumnFilterRow showSearch={false} />
)
}
Loading live example…

Overview

Layerenable* (engine, resolved in useBstTable)
Typeboolean
Defaulttrue
Maps tov9 enableColumnFilters (+ bstCondition filterFn)
Status✅ done (Phase 3)
Sincev0.9.0
Settings sheetData operations

Per-column filtering behaviour (drives the E3 filter builder). Maps to v9 enableColumnFilters. Default: true.

Enable it

<BstTableMui
data={rows}
columns={columns}
enableColumnFilters
/>

Swap BstTableMui for BstTableShadcn (and the CSS import) for the shadcn skin — same props.

Spec coverage

Spec codes (A1, C2, X8, …) are Bst-Table's internal requirement IDs from the capability matrix; P0P2 mark the delivery phase. They are traceability tags, not part of the public API.

  • E3 · Advanced filtering — ✅ built. P3 — filter builder + bstCondition