Skip to main content

Find

Prop enableFind — engine behaviour, default false.

Guide

When to use it

Let users find and jump between matches inside the grid (⌘/Ctrl+F) — like the browser's find — without removing any rows. Reach for it when the surrounding rows still matter and filtering them away would lose context.

How it works

enableFind adds an in-grid find bar that highlights every match and steps between them (Next / Prev, "n of m"). ⌘/Ctrl+F opens it; Enter / F3 cycle forward, Shift reverses; Esc closes. Pass an object to configure it:

<BstTableMui
data={rows}
columns={columns}
getRowId={(r) => r.id}
enableFind={{ caseSensitive: false, scope: 'view' }}
showFind
/>

An object implies enabled. Add showFind for a toolbar button — the shortcut works either way.

Gotchas

  • Distinct from global search (enableGlobalFilter): Find hides nothing — it highlights and jumps; global search removes non-matching rows.
  • Matching runs over the visible cell text; scope: 'all' looks beyond the current page.

Live example

Find — highlight and jump between matches without hiding rows

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}
enableFind showFind />
)
}
Loading live example…

Overview

Layerenable* (engine, resolved in useBstTable)
Typeboolean | BstFindOptions
Defaultfalse
Maps tocustom — dep-free in-grid find bar that HIGHLIGHTS matches and jumps between them (Next/Prev · "n of m") without hiding rows (distinct from enableGlobalFilter, which removes non-matches). Matches computed over the visible cell text (cellClipboardText = formatValue ∘ draftAwareValue), held in the interaction store, painted per-cell via CellSlice (findRanges/isCurrentFind) so only matched cells repaint; plain-text cells get in-place <mark>s, any cell gets a bst-find-hit/-current tint. ⌘/Ctrl+F opens (independent of enableCellSelection), Enter/Shift+Enter cycle in the box, F3/Shift+F3 cycle, Esc closes; current match scrolls into view (virtualized scrollToIndex + scrollIntoView). enableFind object form = { caseSensitive?, scope?: 'view'|'all' }. Adapters add a toolbar Find button (showFind). In settings ("Data operations", always shown). Both skins inherit it
Status✅ done
Sincev0.42.0
Settings sheetData operations

Find — an in-grid search box that highlights matches and jumps between them (Next / Prev) WITHOUT hiding rows — distinct from the global search (enableGlobalFilter), which removes non-matching rows. Open with ⌘/Ctrl+F, cycle with Enter / F3 (Shift for previous), close with Esc. Pass an object ({ caseSensitive?, scope? }) to configure; an object implies enabled. Default: false.

Enable it

<BstTableMui
data={rows}
columns={columns}
enableFind={/* boolean | BstFindOptions */}
/>

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

Options

OptionNotes
BstFindOptionsRelated prop for this feature.
showFindRelated prop for this feature.

Behavior & interactions

  • Find (X8) — a search box that HIGHLIGHTS matches and jumps between them (Next / Prev, "n of m") WITHOUT hiding rows — distinct from enableGlobalFilter, which removes non-matching rows. Open with ⌘/Ctrl+F, cycle with Enter / F3 (Shift for previous), close with Esc. Pass { caseSensitive?, scope? } to configure (an object implies enabled). Off by default. Adapters expose a toolbar "Find" button via showFind.

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.

  • F3 · Disable column — ✅ built. P3 — meta.disabled