Skip to main content
Light Dark System

Datagrid Column Resize Controller

Et2DatagridColumnResizeController Controller

Overview

Header column drag-to-resize for Et2Datagrid.

Binds interact.js draggable listeners to the currently-rendered .dg-col-resize-handle elements. Those elements are replaced by Lit on every render, so hostUpdated() re-binds them after each one rather than trying to track handle identity across re-renders - re-binding is a cheap no-op when the handle set hasn’t actually changed.

helperLeftPx/helperWidthPx position the host’s floating resize-guide overlay while dragging (read directly from this controller in the host’s render()); since they’re plain fields rather than Lit @state() properties, host.requestUpdate() is called explicitly whenever they change. The dg-resizing/dg-resize-limit-min/dg-resize-limit-max classes are toggled directly on the host element instead, since nothing else in the template needs to react to them.

Used by

These widgets create and host this controller.

Methods

Name Description Arguments
hostUpdated() Re-bind resize handles after every render - matches the unconditional call this replaced from the host’s own updated(), since setupInteract() already no-ops when the handle set hasn’t changed. -