API reference

Every property, method and event on <bm-treelistview>, version 0.13.0. Generated from the component's own source, so it cannot fall behind it.

Attributes are strings; properties carry real values. Anything typed as an array, an object or a function has to be set as a propertygrid.columns = […], not columns="…". Cards below are marked property only where there is no attribute.

Properties 94

accessibleLabel string attribute: accessible-labeldefault 'Tree list view'

Accessible name for the grid.

allowCellRangeSelection boolean attribute: allow-cell-range-selectiondefault falsesince 0.6.0

Let the user select a rectangular range of cells.

Requires cellNavigation. Shift+arrow and Shift+click extend the range; Ctrl/Cmd+C copies just that rectangle rather than whole rows.

allowClipboard boolean attribute: allow-clipboarddefault truesince 0.2.0

Enable Ctrl/Cmd+C copying of the selection.

allowColumnReorder boolean attribute: allow-column-reorderdefault falsesince 0.2.0

Enable dragging column headers to reorder them.

allowColumnResize boolean attribute: allow-column-resizedefault true

Enable column resize handles.

allowContextMenu boolean attribute: allow-context-menudefault true

Emit tlvContextMenu on right-click instead of showing the browser menu.

allowDragDrop boolean attribute: allow-drag-dropdefault false

Enable row drag and drop.

allowFiltering boolean attribute: allow-filteringdefault true

Enable the global filter.

allowGrouping boolean attribute: allow-groupingdefault falsesince 0.2.0

Enable grouping, including the group panel drop target.

allowMultiSort boolean attribute: allow-multi-sortdefault truesince 0.2.0

Enable multi-column sorting via Shift-click.

allowPaste boolean attribute: allow-pastedefault falsesince 0.5.0

Allow multi-cell paste from the clipboard with Ctrl/Cmd+V.

Off by default: pasting writes to many cells at once, and a grid that silently accepts a spreadsheet block is a grid that can lose a lot of data to one stray keystroke. Turn it on deliberately.

allowSorting boolean attribute: allow-sortingdefault true

Enable header-click sorting.

allowTypeAhead boolean attribute: allow-type-aheaddefault truesince 0.2.0

Enable jump-to-row when typing a printable character.

allowUndo boolean attribute: allow-undodefault falsesince 0.5.0

Keep an undo history of edits and pastes, reachable with Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z (or Ctrl+Y).

announceChanges boolean attribute: announce-changesdefault true

Announce selection, sorting and filtering changes to screen readers.

cascadeSelection boolean attribute: cascade-selectiondefault falsesince 0.3.0

Ticking a parent's checkbox ticks every selectable descendant, and a parent shows a partial (indeterminate) state when only some of its descendants are ticked.

Defaults to false so existing applications keep the flat behaviour they were written against. New tree applications almost always want it on.

cellNavigation boolean attribute: cell-navigationdefault falsesince 0.6.0

Move focus by cell rather than by row.

With this on, the arrow keys walk cells, Tab steps through them in reading order, and Shift+arrow extends a rectangular range. Expansion moves to the tree column: Right opens a closed row, Left closes an open one, exactly as the APG treegrid pattern prescribes - and +/- still work anywhere.

Off by default, because row navigation is the right model for a grid used as a list or a picker, and changing it under existing applications would be a breaking change in everything but name.

cellRenderers Record<string, TlvCellRenderer> property only

Custom cell renderers, keyed by column id. Property-only (functions cannot be expressed as HTML attributes).

collapseIcon string attribute: collapse-icondefault '▾'

Glyph for an expanded parent.

columnFilters TlvColumnFilter[] | string attribute: column-filtersdefault []since 0.2.0

Active per-column filters.

columns TlvColumn[] | string attribute: columnsdefault []

Column definitions. Accepts an array or a JSON string, so the grid can be configured entirely from markup.

componentShadow boolean attribute: component-shadowdefault true

Outer drop shadow on the component.

conditionalFormats TlvConditionalFormat[] | string attribute: conditional-formatsdefault []since 0.7.0

Rules that decide how a cell or a row looks, from what it contains.

Evaluated in order; the first match wins. Merging several matches would mean arbitrating between one rule that says red and another that says green, and any answer to that is arbitrary - ordered rules put the decision with whoever wrote the list.

Accepts an array or a JSON string, so it can be set from markup.

currency string attribute: currencydefault 'GBP'

ISO 4217 currency code. Columns may override it individually.

dataSource TlvDataSource property onlysince 0.8.0

Fetch rows from the server instead of holding them all in memory.

The grid calls this with the user's current sort, filters, grouping and the row range it needs, and renders whatever comes back.

With a data source attached the grid stops sorting, filtering, grouping and paginating locally. Everything the request describes is the application's job. Doing both would apply each operation twice - a server returning the top 20 by revenue would have them re-sorted into the local page's own order - and produce subtly wrong pages nobody can explain.

dataSourceBlockSize number attribute: data-source-block-sizedefault 100since 0.8.0

How many rows to ask the data source for at a time.

Requests are aligned to blocks of this size rather than to the exact visible range, so scrolling by one row does not fire a new request for a range shifted by one. Aligned blocks repeat, and repeat means cacheable.

dataSourceDebounce number attribute: data-source-debouncedefault 250since 0.8.0

Wait this many milliseconds after the query changes before asking the server.

Typing in the filter box would otherwise fire a request per keystroke.

density TlvDensity attribute: densitydefault 'comfortable'

Row height and padding preset.

detailHeight number attribute: detail-heightdefault 160since 0.9.0

Height of a detail panel, in pixels.

A fixed height rather than auto: the row virtualiser positions rows from a uniform height, and a panel that measured itself would put every row below it in the wrong place until the measurement landed.

detailRenderer (context: { node: TlvNode; index: number }) => string | HTMLElement | undefined property onlysince 0.9.0

Render an expandable detail panel beneath a row.

Return an HTML string or an element. Returning undefined means "no detail for this row", so a grid can have detail on some rows and not others without a second flag.

grid.detailRenderer = ({ node }) => `<dl>...</dl>`;

Framework users can instead leave this unset, listen for tlvDetailAttach, and mount their own component into the container element the event carries - that is the same hook React, Angular and Vue all understand, so the wrappers need no special case.

direction 'auto' | 'ltr' | 'rtl' attribute: directiondefault 'auto'since 0.2.0

Writing direction. auto inherits from the page, which is almost always what you want; set it explicitly to force one grid to differ.

editable boolean attribute: editabledefault falsesince 0.2.0

Master switch for inline editing. Columns still need editable: true.

emptyText string attribute: empty-textdefault 'No records to display.'since 0.2.0

Message shown when there are no rows to display.

errorText string attribute: error-textdefault ''

Show an error banner. Empty hides it.

expandIcon string attribute: expand-icondefault '▸'

Glyph for a collapsed parent.

expandOnRowClick boolean attribute: expand-on-row-clickdefault false

Clicking anywhere on a row also toggles its expansion.

filterPlaceholder string attribute: filter-placeholderdefault 'Filter...'since 0.2.0

Placeholder shown in the global filter box.

filterText string attribute: filter-textdefault ''

Global filter text. Two-way.

footerSelectedLabel string attribute: footer-selected-labeldefault 'Selected'

Footer label before the selected row count.

footerVisibleLabel string attribute: footer-visible-labeldefault 'Visible rows'

Footer label before the visible row count.

freezeTreeColumn boolean attribute: freeze-tree-columndefault false

Keep the tree column (and checkbox column) fixed during horizontal scroll.

groupBy TlvGroupDescriptor[] | string attribute: group-bydefault []since 0.2.0

Active grouping.

groupPanelText string attribute: group-panel-textdefault 'Drag a column header here to group by it'since 0.2.0

Prompt shown in an empty group panel.

highlightMatches boolean attribute: highlight-matchesdefault truesince 0.2.0

Highlight the parts of a cell that matched the filter.

items TlvNode[] | string attribute: itemsdefault []

Row data. Accepts an array or a JSON string.

leafIcon string attribute: leaf-icondefault ''

Glyph for a leaf row. Empty renders nothing.

loading boolean attribute: loadingdefault false

Show the loading overlay and set aria-busy.

loadingText string attribute: loading-textdefault 'Loading...'since 0.2.0

Message shown beside the loading spinner.

locale string attribute: localedefault 'en-GB'

BCP 47 locale used for dates, numbers and text collation.

messages Partial<TlvMessages> | string attribute: messagessince 0.7.0

Translations for everything the grid says.

Only the keys you supply are overridden; the rest fall back to English. Values are template strings with {named} placeholders, or - where a count is involved - an object of CLDR plural forms (one, other, and whichever others your language uses), selected with Intl.PluralRules against locale.

mode TlvMode attribute: modedefault 'tree'

tree nests and indents rows; list flattens the hierarchy.

overscan number attribute: overscandefault 8

Extra rows rendered above and below the viewport.

page number attribute: pagedefault 0since 0.8.0

The current zero-based page. Two-way.

pageSize number attribute: page-sizedefault 0since 0.8.0

Show one fixed-size page at a time instead of scrolling the whole list.

Zero - the default - means no paging.

parentRollUp TlvParentRollUp attribute: parent-roll-updefault 'off'since 0.3.0

Whether a parent row displays an aggregate of the leaves beneath it, for columns that declare an aggregate.

  • off - parents show only their own values.
  • whenEmpty - a rolled-up value fills in a parent that has no value of its own, and deliberate parent-level figures are left alone.
  • always - the roll-up wins, for datasets where parents are containers.
persistState boolean attribute: persist-statedefault false

Save and restore user state in localStorage.

printAllRows boolean attribute: print-all-rowsdefault truesince 0.7.0

Render every row while the browser is printing, even when virtualisation is on.

A virtualised grid otherwise prints only the handful of rows that happen to be in the DOM, which produces a report that is quietly missing most of its data - the worst kind of wrong.

rowActions TlvRowAction[] | string attribute: row-actionsdefault []

Row action buttons. Rendered only by a column with kind: 'actions'.

rowActionsTabbable boolean attribute: row-actions-tabbabledefault false

Include row action buttons in the tab order.

rowCheckboxLabel string attribute: row-checkbox-labeldefault 'Select row'

Label prefix for each row checkbox.

rowHeight number attribute: row-heightdefault 38

Row height in pixels while virtualised. Must match the rendered height.

rowHoverShadow boolean attribute: row-hover-shadowdefault false

Drop shadow on the hovered row.

selectAllLabel string attribute: select-all-labeldefault 'Select all visible rows'

Label for the header select-all checkbox.

selectedId string attribute: selected-id

The selected row in single mode. Two-way: updated as the user selects.

selectedIds string[] | string attribute: selected-idsdefault []

The selected rows in multiple/checkbox mode. Two-way.

selectionFollowsFocus boolean attribute: selection-follows-focusdefault truesince 0.2.0

Move the selection along with keyboard focus.

true reproduces v0.1 behaviour and is convenient for a master/detail layout. false is better for multiple selection, where a user needs to move focus past rows without selecting them.

selectionMode TlvSelectionMode attribute: selection-modedefault 'single'

How rows may be selected.

showColumnFilters boolean attribute: show-column-filtersdefault falsesince 0.2.0

Show a per-column filter row beneath the header.

showColumnMenu boolean attribute: show-column-menudefault falsesince 0.2.0

Show a column-chooser button in the header's trailing corner.

showFilter boolean attribute: show-filterdefault false

Show the global filter box.

showFooter boolean attribute: show-footerdefault false

Show the footer status bar.

showGroupPanel boolean attribute: show-group-paneldefault falsesince 0.2.0

Show the drop target for grouping columns, above the header.

showHeader boolean attribute: show-headerdefault true

Show the column header row.

showSelectionCount boolean attribute: show-selection-countdefault true

Include the selected-row count in the footer.

showToolbar boolean attribute: show-toolbardefault false

Show the toolbar, which exposes the toolbar-left/toolbar-right slots.

showTotals boolean attribute: show-totalsdefault falsesince 0.2.0

Show a totals row at the bottom, populated from each column's aggregate.

skeletonRows number attribute: skeleton-rowsdefault 0since 0.7.0

Show shimmering placeholder rows while loading is true, instead of a single line of text.

sortColumnId string attribute: sort-column-id

Primary sort column. Two-way. Mirrors sortModel[0].

sortDirection TlvSortDirection attribute: sort-directiondefault 'none'

Primary sort direction. Two-way. Mirrors sortModel[0].

sortModel TlvSortDescriptor[] | string attribute: sort-modeldefault []since 0.2.0

Full multi-column sort. Takes precedence over sortColumnId when set.

stateStorageKey string attribute: state-storage-keydefault 'tlv-treelistview-state'

Storage key used when persistState is on.

theme TlvTheme attribute: themedefault 'light'

Colour theme. auto follows the operating system's light/dark setting.

totalsLabel string attribute: totals-labeldefault 'Totals'since 0.2.0

Leading label of the totals row.

treeColumnId string attribute: tree-column-id

Explicitly nominate the tree column. Defaults to the first column.

truncationTooltips boolean attribute: truncation-tooltipsdefault truesince 0.6.0

Show the full text as a tooltip on cells whose content is cut off.

Measured on hover rather than on every paint: a truncation test is a layout read, and doing one per cell per render would cost more than the feature is worth on a large grid.

undoLimit number attribute: undo-limitdefault 100since 0.5.0

How many undo steps to retain. One edit or one paste is one step.

validateRow (context: TlvRowEditContext) => TlvEditValidationResult | Promise<TlvEditValidationResult> property onlysince 0.5.0

Row-level validation, applied after the edited column's own validator accepts the value.

Receives the row as it would be once the edit commits, so a rule that compares fields - "end date must be after start date" - can read the whole row without reconstructing it. Return true/nothing to accept, a string to reject, or a Promise of either for a check that needs the network.

validatingText string attribute: validating-textdefault 'Checking...'since 0.5.0

Shown beside a cell while an async validator is running.

viewsStorageKey string attribute: views-storage-keysince 0.9.0

Where saved views are kept, in localStorage.

Unset means views live in memory only and are gone on reload - explicit rather than silently writing to a key the application did not choose.

virtualize boolean attribute: virtualizedefault false

Render only the rows near the viewport.

virtualizeColumns boolean attribute: virtualize-columnsdefault falsesince 0.8.0

Render only the columns near the horizontal viewport.

Worth turning on somewhere past thirty or forty columns. Pinned columns and a frozen tree column are always rendered whatever this says - they are position: sticky and are meant to stay on screen exactly when their natural offset is not.

virtualizeThreshold number attribute: virtualize-thresholddefault 0since 0.2.0

Turn virtualisation on automatically once the pipeline produces more than this many rows. 0 disables the automatic behaviour.

This exists because virtualisation is a trade: it makes 100,000 rows possible and makes 30 rows marginally worse (fixed row heights, an extra scroll listener). A threshold gets both.

zebra boolean attribute: zebradefault false

Alternating row background.

Methods 61

applyView(idOrName: string) => Promise<boolean> since 0.9.0

Apply a saved view by id or name.

autoFitColumn(columnId: string) => Promise<void> since 0.3.0

Resize one column to fit its widest visible content.

Honours the column's own minWidth and maxWidth, and emits tlvColumnResize exactly as a drag would, so persistence and application listeners cannot tell the two apart.

Only rendered rows are measured. With virtual scrolling on, the rows outside the viewport have no DOM to measure, so this fits what is on screen - the same thing a spreadsheet does when you double-click a column edge. Call it again after scrolling if you want a different sample.

autoFitColumns() => Promise<void> since 0.3.0

Auto-fit every visible column in one pass.

beginEdit(nodeId: string, columnId: string) => Promise<boolean> since 0.2.0

Open the editor on a cell.

cancelEdit() => Promise<void> since 0.2.0

Abandon the open editor.

clearCellRange() => Promise<void> since 0.6.0

Drop the cell selection.

clearHistory() => Promise<void> since 0.5.0

Throw the undo history away.

Called automatically whenever data arrives from outside the grid, because an entry recorded against rows that have since been replaced would undo to values the user never saw. See the note at the top of core/history.ts.

clearPersistedState() => Promise<void> since 0.2.0

Delete the persisted snapshot from localStorage.

clearSelection() => Promise<void>

Clear the selection.

collapseAll() => Promise<void>

Collapse every node.

collapseAllGroups() => Promise<void> since 0.2.0

Collapse every group.

commitEdit() => Promise<boolean> since 0.2.0

Commit the open editor.

copyCellRange() => Promise<boolean> since 0.6.0

Copy the selected rectangle to the clipboard as TSV.

copyToClipboardAsText(selectedOnly?: boolean) => Promise<boolean> since 0.2.0

Copy rows to the clipboard as TSV, which is what spreadsheets paste best.

deleteView(idOrName: string) => Promise<boolean> since 0.9.0

Remove a saved view.

downloadData(options?: TlvExportOptions, filename?: string) => Promise<void> since 0.2.0

Serialise and download in one step.

downloadVisibleDataAsCsv(filename?: string) => Promise<void>

Download the visible rows as CSV. Kept for compatibility.

expandAll() => Promise<void>

Expand every expandable node.

expandAllGroups() => Promise<void> since 0.2.0

Expand every group.

expandToNode(nodeId: string, scroll?: boolean) => Promise<boolean> since 0.2.0

Expand every ancestor of a node so it becomes visible, then scroll to it.

exportData(options?: TlvExportOptions) => Promise<string> since 0.2.0

Serialise the grid to a string.

exportWorkbook(options?: TlvExportOptions) => Promise<Blob> since 0.9.0

The grid as a real .xlsx workbook.

Separate from exportData() because the result is binary: numbers arrive as numbers, dates as dates, and the header row is frozen, none of which a string can carry.

focusCellAt(nodeId: string, columnId: string, extend?: boolean) => Promise<void> since 0.6.0

Focus a cell programmatically, and optionally extend the range to it.

getCellRange() => Promise<{ range?: TlvCellRange; cells: TlvCellRef[]; }> since 0.6.0

The current cell selection, for applications that want to act on it.

getColumnOrder() => Promise<string[]> since 0.2.0

The current column display order, by id.

getHistoryState() => Promise<{ canUndo: boolean; canRedo: boolean; }> since 0.5.0

Whether there is anything to undo or redo, for driving your own toolbar.

getOpenDetailIds() => Promise<string[]> since 0.9.0

Which rows currently show a detail panel.

getPageState() => Promise<{ page: number; pageCount: number; pageSize: number; }> since 0.8.0

Where the pager is, for driving your own controls.

getRowCount() => Promise<number> since 0.2.0

How many rows the pipeline produced, including group headers.

getSelectedNodes() => Promise<TlvNode[]> since 0.2.0

The currently selected nodes, in visible order.

getState() => Promise<TlvStateSnapshot>

A serialisable snapshot of the user's current view configuration.

getViews() => Promise<TlvSavedView[]> since 0.9.0

Every saved view.

getVisibleData() => Promise<TlvNode[]>

The nodes currently visible, in display order. Group headers are excluded.

getVisibleDataAsCsv() => Promise<string>

The visible rows as CSV. Kept for compatibility; exportData is more capable.

goToPage(page: number) => Promise<number> since 0.8.0

Go to a page.

Clamped rather than rejected: a filter can remove most of the rows while the user sits on page 40, and the reasonable answer is the last page.

moveColumn(columnId: string, toIndex: number) => Promise<void> since 0.2.0

Move one column to a new index.

pasteFromClipboard() => Promise<number> since 0.5.0

Read the clipboard and paste it.

Kept separate from pasteFromText() because reading the clipboard needs a permission the application may not have, and may reject. An application that already holds the text - from its own paste handler, say - should call pasteFromText() and skip the permission entirely.

pasteFromText(text: string, anchor?: { nodeId: string; columnId: string; }) => Promise<number> since 0.5.0

Paste a block of clipboard text into the grid.

The anchor defaults to the last cell the user edited, then to the active row's first editable column - the honest answer to "where am I?" while the grid still navigates by row rather than by cell.

Read-only cells inside the block are skipped rather than blocking the paste, and a block that runs past the last row or column is trimmed rather than wrapped. Both are reported in tlvPaste.

The whole paste is one undo step.

ready() => Promise<void> since 0.2.0

Resolves once the grid has rendered for the first time.

Use this before calling any other method on a freshly created element:

const grid = document.createElement('bm-treelistview');
document.body.appendChild(grid);

await customElements.whenDefined('bm-treelistview');
await grid.ready();
await grid.setData(columns, items);

Prefer this over Stencil's componentOnReady(), which exists only in the lazy build and is absent from the single-file runtime.

redo() => Promise<boolean> since 0.5.0

Step forward again.

refresh() => Promise<void> since 0.2.0

Force the pipeline to recompute.

Only needed when an application mutates a node object it passed in, rather than supplying a new array. Doing that is discouraged - it defeats the revision-based caching - but it happens, and this is the escape hatch.

resetColumnWidths() => Promise<void>

Reset every column to its defined width.

restoreState(state: TlvStateSnapshot) => Promise<void>

Restore a snapshot produced by getState().

saveView(name: string) => Promise<TlvSavedView> since 0.9.0

Save the current arrangement under a name.

Saving over a name already in use replaces it, which is what "save" means to a user - the alternative is a menu that fills with "Report (2)".

Selection and expansion are deliberately not part of a view: both describe rows, and rows come and go.

scrollToIndex(index: number, align?: "auto" | "start" | "center" | "end") => Promise<void> since 0.2.0

Scroll a row index into view.

scrollToNode(nodeId: string, align?: "auto" | "start" | "center" | "end") => Promise<void> since 0.2.0

Scroll a row into view by node id.

selectAll() => Promise<void> since 0.2.0

Select every selectable visible row.

selectNodeById(nodeId: string) => Promise<void>

Select one row by id, replacing the current selection.

setColumnFilters(filters: TlvColumnFilter[]) => Promise<void> since 0.2.0

Replace the per-column filters.

setColumnOrder(order: string[]) => Promise<void> since 0.2.0

Set the column display order. Unlisted columns keep their relative place.

setColumnVisible(columnId: string, visible: boolean) => Promise<void>

Show or hide a column.

setData(columns: TlvColumn[], items: TlvNode[]) => Promise<void>

Replace the columns and rows in one call.

Preferred over setting the props separately: it applies both in a single update, so the pipeline runs once instead of twice and there is no frame where new rows are laid out against old columns.

setFilterText(value: string) => Promise<void>

Set the global filter text.

setGroupBy(groups: TlvGroupDescriptor[]) => Promise<void> since 0.2.0

Replace the grouping. Pass an empty array to ungroup.

setItemsData(items: TlvNode[], preserveExpansion?: boolean) => Promise<void> since 0.2.0

Replace the rows, leaving the columns alone.

setSortModel(model: TlvSortDescriptor[]) => Promise<void> since 0.2.0

Replace the multi-column sort.

setViews(views: TlvSavedView[]) => Promise<void> since 0.9.0

Replace the whole list, e.g. with views loaded from a server.

toggleDetail(nodeId: string, open?: boolean) => Promise<boolean> since 0.9.0

Open or close a row's detail panel.

Separate from row expansion on purpose: a row can have children and a detail panel, and collapsing the subtree should not close the panel the user opened to read.

undo() => Promise<boolean> since 0.5.0

Step back through the edit history.

updateNode(nodeId: string, cells: Record<string, unknown>) => Promise<void> since 0.2.0

Update one row's cell values in place.

Merges into the existing cells rather than replacing them, so a partial update is safe. Cheaper than replacing the whole dataset because it reuses every untouched branch.

updateNodeChildren(nodeId: string, children: TlvNode[]) => Promise<void>

Attach lazily-loaded children to a node.

Marks the node as loaded and expands it, so the spinner an application showed on tlvLazyLoad resolves into content in one step.

Events 30

tlvActionClick CustomEvent<TlvActionClickDetail> bubblesreact: onTlvActionClick

A row action button was clicked.

tlvActiveCellChange CustomEvent<{ nodeId?: string; columnId?: string }> bubblesreact: onTlvActiveCellChangesince 0.6.0

The focused cell moved.

tlvActiveRowChange CustomEvent<TlvActiveRowChangeDetail> bubblesreact: onTlvActiveRowChangesince 0.2.0

Keyboard focus moved to a different row.

tlvCellEditCancel CustomEvent<TlvCellEditCancelDetail> bubblesreact: onTlvCellEditCancelsince 0.2.0

A cell edit was abandoned or rejected by a validator.

tlvCellEditCommit CustomEvent<TlvCellEditCommitDetail> bubblesreact: onTlvCellEditCommitsince 0.2.0

A cell edit was accepted. The component has already applied it optimistically; persist it, and call setData() or updateNode() to revert on failure.

tlvCellEditStart CustomEvent<TlvCellEditStartDetail> bubblesreact: onTlvCellEditStartsince 0.2.0

A cell editor opened.

tlvCellRangeChange CustomEvent<{ range?: TlvCellRange; rows: number; columns: number }> bubblesreact: onTlvCellRangeChangesince 0.6.0

The selected cell rectangle changed.

tlvColumnFilterChange CustomEvent<TlvColumnFilterChangeDetail> bubblesreact: onTlvColumnFilterChangesince 0.2.0

The per-column filters changed.

tlvColumnReorder CustomEvent<TlvColumnReorderDetail> bubblesreact: onTlvColumnReordersince 0.2.0

A column was dragged to a new position.

tlvColumnResize CustomEvent<TlvColumnResizeDetail> bubblesreact: onTlvColumnResize

A column finished being resized.

tlvContextMenu CustomEvent<TlvContextMenuDetail> bubblesreact: onTlvContextMenu

A row was right-clicked and allowContextMenu is on.

tlvCopy CustomEvent<{ text: string; rowCount: number }> bubblesreact: onTlvCopysince 0.2.0

Rows were copied to the clipboard.

tlvDataSourceError CustomEvent<{ request: TlvDataRequest; error: unknown }> bubblesreact: onTlvDataSourceErrorsince 0.8.0

The data source rejected a request.

tlvDetailAttach CustomEvent<{ node: TlvNode; container: HTMLElement }> bubblesreact: onTlvDetailAttachsince 0.9.0

A detail panel was rendered and is ready to be filled.

Carries the container element, so a framework can mount its own component into it rather than handing the grid an HTML string.

tlvDetailToggle CustomEvent<{ node: TlvNode; open: boolean }> bubblesreact: onTlvDetailTogglesince 0.9.0

A detail panel was opened or closed.

tlvFilterChange CustomEvent<string> bubblesreact: onTlvFilterChange

The global filter text changed.

tlvGroupChange CustomEvent<TlvGroupChangeDetail> bubblesreact: onTlvGroupChangesince 0.2.0

The grouping changed.

tlvHistoryChange CustomEvent<TlvHistoryChangeDetail> bubblesreact: onTlvHistoryChangesince 0.5.0

The undo/redo stack moved.

Emitted on every commit, undo, redo and clear, so an application can keep its own Undo button's enabled state in step without polling.

tlvLazyLoad CustomEvent<TlvNode> bubblesreact: onTlvLazyLoad

A node with unloaded children was expanded. Respond by fetching them and calling updateNodeChildren(node.id, children).

tlvNodeCollapse CustomEvent<TlvNode> bubblesreact: onTlvNodeCollapse

A node was collapsed.

tlvNodeDrop CustomEvent<TlvNodeDropDetail> bubblesreact: onTlvNodeDrop

A row was dropped onto another row. The application performs the move.

tlvNodeExpand CustomEvent<TlvNode> bubblesreact: onTlvNodeExpand

A node was expanded.

tlvPageChange CustomEvent<{ page: number; pageCount: number; pageSize: number }> bubblesreact: onTlvPageChangesince 0.8.0

The page changed.

tlvPaste CustomEvent<TlvPasteDetail> bubblesreact: onTlvPastesince 0.5.0

A clipboard block was pasted into the grid.

tlvRowDoubleClick CustomEvent<TlvNode> bubblesreact: onTlvRowDoubleClick

A row was double-clicked, or activated with Enter.

tlvRowsRendered CustomEvent<TlvRowsRenderedDetail> bubblesreact: onTlvRowsRenderedsince 0.2.0

A window of rows was painted. Useful for telemetry and tests.

tlvSelectionChange CustomEvent<TlvNode | TlvNode[]> bubblesreact: onTlvSelectionChange

The selection changed. Detail is a node in single mode, an array otherwise.

tlvSortChange CustomEvent<TlvSortChangeDetail> bubblesreact: onTlvSortChange

The sort changed.

tlvStateChange CustomEvent<TlvStateSnapshot> bubblesreact: onTlvStateChange

Any persistable state changed. Fires whether or not persistState is on.

tlvViewsChange CustomEvent<{ views: TlvSavedView[] }> bubblesreact: onTlvViewsChangesince 0.9.0

The saved views list changed.

CSS parts

The component uses Shadow DOM, so host page CSS cannot reach inside it. ::part() is the sanctioned way through.

bm-treelistview::part(header-cell) { text-transform: uppercase; }
bm-treelistview::part(row-selected) { outline: 2px solid #2563eb; }
Part
band-cell
band-title
body
cell
cell-content
checkbox
checkbox-cell
checkbox-header-cell
column-menu
column-menu-button
column-menu-item
demo-badge
demo-limit-notice
detail-panel
detail-row
editor-checking
editor-error
editor-wrap
empty
error
expander
expander-icon
filter-bar
filter-cell
filter-input
filter-operator
filter-row
filter-value
footer
footer-item
footer-mode
group-aggregates
group-cell
group-chip
group-expander
group-heading
group-label
group-panel
group-row
header
header-bands
header-cell
header-title
loading
node-icon
pager
pager-button
resize-handle
row
scroll
select-all-checkbox
shell
skeleton
sort-indicator
table
toolbar
toolbar-button
toolbar-left
toolbar-right
totals-cell
totals-row

Slots

Slot
empty
error
footer
loading
toolbar-left
toolbar-right

CSS custom properties

Prefer these over ::part() where they cover what you need — they survive upgrades that a selector into internal structure may not. See Theming.

Property