TableToolbar
The controls above a table: full-width search on its own line, filters below, actions and a columns menu pinned right.
| Invoice | Client | Amount | Status |
|---|---|---|---|
| INV-2043 | Acme Industries | €4,280 | due |
| INV-2042 | Northwind Trading | €1,150 | paid |
| INV-2041 | Globex | €9,600 | due |
| INV-2040 | Initech | €320 | paid |
import { TableToolbar, SearchBar, FilterTabs, DataTable } from '@objectifthunes/whiteboard'
// columns live in state so the Columns menu can toggle their hidden flag
const [columns, setColumns] = useState<Column<Row>[]>([...])
<TableToolbar
search={<SearchBar value={q} onChange={setQ} label="" placeholder="Search…" />}
filters={<FilterTabs value={status} onChange={setStatus} options={STATUSES} />}
columns={columns}
onColumnsChange={setColumns}
actions={<Button><Plus size={13} />New invoice</Button>}
/>
<DataTable columns={columns} rows={rows} rowKey={r => r.id} />Search gets its own full-width line, and filters go on the next one. It is the control people reach for first and it needs the room; cramming both onto one row is what makes admin headers feel cramped.
Pass the same columns array you gave DataTable, plus a setter, and you get a Columns menu that toggles each column's hidden flag. The rows use keepOpen, so you can hide three columns without reopening the menu three times. The last visible column cannot be hidden — an empty table is never what the user meant.
Bulk actions for selected rows are deliberately not here. Those belong in StickyBar, pinned to the bottom of the viewport where they stay reachable however far down the table you have scrolled.