WarUI documentation

Grid lifecycle phases

experimental

Follow attach, ready, detach and disposal while moving one grid between containers.

Live example

Expected behavior

Ready follows the first render and layout measurement. Reattachment keeps selection and focus. Readiness rejects after disposal.

Source

await api.attach({
  render: () => renderRows(api.getVisibleRows()),
  measure: () => measureFirstRow(),
  detach: () => removeRenderedRows(),
});
await api.whenReady();

API reference

GRID-A01-F08 API
KindNameTypeDescription
MethodgetLifecyclePhase—Reads the current lifecycle phase.
Methodattach—Runs rendering and measurement with an attachment abort signal.
MethodwhenReady—Resolves after the measurement, or rejects if disposal or detachment interrupts readiness.