TreeDataGridWebv0.1.0

Installation.

From package to working component.

Install the package

Use the same published version as this showcase, or review the upstream release notes before updating.

npm install @wieslawsoltes/treedatagridweb@0.1.0

This package’s license: MIT. Retain upstream and bundled third-party notices when redistributing.

Mount your first view

Import models from /core and register with /web. Set grid.Model, then give the element an explicit height.

HTML
<div class="toolbar"><button id="add">Add row</button><button id="update">Update first row</button><output id="count"></output></div><tree-data-grid id="grid" class="stage" style="display:block" aria-label="Component inventory"></tree-data-grid><p class="hint">Click a column header to sort. Double-click a value to edit. Resize columns at their edges.</p>

The complete executable source is in the usage guide. Imports shown here are intended for a bundler or a browser import map; bare npm imports do not resolve in ordinary HTML by themselves.

Own the lifetime

Dispose the grid and the source when their owning view is removed. Share one source intentionally when multiple views should share state.

The playground replaces its entire isolated frame on each run. In your application, use the framework’s unmount or disposal hook instead. Do not dispose a shared model while another view still owns it.

Read the lifecycle guide →

Know the contract

The control implements documented browser contracts, not exhaustive Avalonia API parity. Very large data still has a model and memory cost.

Source repositories can contain work newer than the published package. The showcase uses @wieslawsoltes/treedatagridweb@0.1.0.

Upstream compatibility documentation ↗
↑ ↓ to explore · Enter to openEsc to close