DataGridCell extends  HTMLElement

The cell element for a DataGrid.

Unlike the row element (a dumb pooled container), the cell is a custom element: it renders content and is the addressable unit a future editable Spreadsheet will give behavior. It carries no model state of its own beyond back-references set at mount — positioning and lifecycle are driven by its DataGridRow controller and the grid's windower. Instances are pooled and recycled, so DataGridCell#reset must fully clear prior state on rebind.

Constructor

new DataGridCell()

Instance Properties

The block the cell's rendered content lives in — a plain box with no padding or border of its own, sized by the content.

It exists so that anything wanting to bound the content can do so without shrinking the cell: a cell is a grid item that stretches to its row's track, and capping the cell instead detaches it from that track — its border-bottom stops meeting the row's edge, and (in Spreadsheet) the selection box, which is drawn from the row geometry, no longer matches the cell it outlines. It is also what makes -webkit-line-clamp usable: on a grid item the clamp only draws the ellipsis, while on an ordinary block it limits the box to the lines it kept. See the collapsible plugin, which caps and clamps this element.

Created once per pooled cell and re-attached on render.

Instance Methods

Bind this (possibly recycled) cell to a row/column/record and render it.

Returns

Detach this cell: de-register from its column, wipe all per-binding state so the pooled element is clean, and return it to the grid's cell pool. Mirrors DataGridRow#unmount.