Examples
Fourteen single-feature examples of @jeyabbalas/data-table. Each imports the
package the way an app would, and keeps to one idea, small enough to copy.
-
01
Minimal
The smallest mount: eight rows defined inline in the script, no network.
createDataTableloadData -
02
Load from URL
100,000 NYC taxi trips fetched as Parquet, with a live progress bar.
loadProgressloadComplete -
03
Programmatic filters
Card, fare, tip and distance filters from buttons, each change logged.
addFilteraddRawSQLFilter -
04
Derived columns
An expression column, a vector column, and a replacement that checks its
dependents.
addDerivedColumnreplaceDerivedColumn -
05
Event listeners
A side panel that observes the table with
on()and drives it withactions.onoff -
06
Custom theme
A terracotta and cream palette, light and dark, all from CSS variables.
--dt-*setColorScheme -
07
i18n (French)
Every label in French from one
messagesobject, on a French wine list.messages -
08
Custom visualization
A US-states choropleth in place of the value counts on a
statecolumn.BaseVisualizationVisualizationRegistry -
09
Multi-table
Two tables sharing a worker, a session store and filter presets: save in A, load in
B.
FilterPresetManagerSessionStore -
10
Column export
Read a column out as a typed array, by the table's filters, sort and selection.
getColumnValues__rowid__ -
11
Annotations
Errors, warnings and info on rows, columns and cells, saved with the session, and
F8 from one to the next.
table.annotationsrevealRow -
12
Column header tooltips
Structured popovers on the column names: title, description and items.
setColumnHeaderTooltip -
13
Custom stats panel
The column-stats slot replaced: mean and spread from a DuckDB query of its own.
BaseStatsPanelStatsPanelRegistry -
14
Standalone SQL editor
CodeMirror editors outside the table that know its columns and DuckDB's
functions.
createSqlExtensionsbuildCompletionContext