Lattice Grid 1.82: a grid that survives Back and Forward
An htmx page keeps its grids through Back and Forward. Press Back on a page that hydrated a server-rendered table into a grid, and the grid comes back live, not a picture of one: its sort, filter and tool panel are exactly where you left them, and Forward returns to wherever the page had moved on to. Only a grid built from a JSON config had that before; a table-hydrated grid now gets it too.
Server-rendered types are respected
A <th data-type="text"> now decides that column’s type for every cell it
hydrates, so a value like 01 keeps its leading zero instead of quietly
becoming the number 1. And when a hydrate columns entry refines one
column, the rest still come from the table rather than disappearing: name
the column you want to change, and everything else keeps reading from the
markup. A page that wants the old all-or-nothing behaviour still has it,
with columns: { only: [...] }.
Viewers survive a swap
A chart or KPI panel bound to a grid that an htmx swap just tore out used
to break on its next redraw. Now it stops cleanly and says so once, by
name, instead of throwing. Mark its container data-lattice-bind="<grid id>" and it re-binds itself to the replacement grid automatically after
the swap; chart.rebind(grid) and kpi.rebind(grid) do the same by hand,
for a page that swaps grids itself. A dashboard keeps its chart and its
panel across a page update, rather than rebuilding them every time.
See it running
The htmx guide covers history, type precedence and
rebinding with a runnable example for each, and the
htmx demo shows the same hydrateTable call
this release changed. What else shipped is in the
changelog.