Skip to main content

Global filter

Prop enableGlobalFilter — engine behaviour, default true.

Guide

When to use it

On by default — one search box that filters across all columns at once. The quickest way for a user to find a row.

How it works

The engine behaviour; the visible search box is the adapter's showSearch. Matching runs over the rendered cell text.

Gotchas

  • The box needs showSearch (on by default) to appear — turn enableGlobalFilter off and the box does nothing.
  • Distinct from Find (enableFind): global filter removes non-matching rows; Find highlights matches without hiding anything.

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}
pagination={{ pageSize: 5 }} />
)
}
Loading live example…

Overview

Layerenable* (engine, resolved in useBstTable)
Typeboolean
Defaulttrue
Maps tov9 enableGlobalFilter
Status✅ done
Sincev0.32.4
Settings sheetData operations

Global search filtering behaviour. Maps to v9 enableGlobalFilter. Default: true.

Enable it

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

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