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();await api.attach({
render: () => renderRows(api.getVisibleRows()),
measure: () => measureFirstRow(),
detach: () => removeRenderedRows(),
});
await api.whenReady();await api.attach({
render: () => renderRows(api.getVisibleRows()),
measure: () => measureFirstRow(),
detach: () => removeRenderedRows(),
});
await api.whenReady();await api.attach({
render: () => renderRows(api.getVisibleRows()),
measure: () => measureFirstRow(),
detach: () => removeRenderedRows(),
});
await api.whenReady();// JavaScript interop module
await api.attach({
render: () => renderRows(api.getVisibleRows()),
measure: () => measureFirstRow(),
detach: () => removeRenderedRows(),
});
await api.whenReady();API reference
| Kind | Name | Type | Description |
|---|---|---|---|
| Method | getLifecyclePhase | — | Reads the current lifecycle phase. |
| Method | attach | — | Runs rendering and measurement with an attachment abort signal. |
| Method | whenReady | — | Resolves after the measurement, or rejects if disposal or detachment interrupts readiness. |