Svelte adapter ยท console.warn
LatticeGrid: `name` changed from "{was}" to "{now}", but a grid publishes itself under the name it had when it mounted. Nothing was republished and the grid was NOT rebuilt - rebuilding it would throw away scroll position, selection and expansion. Give the component a `key`-style `{#if}` when a genuine rebuild is wanted.
Printed by Svelte adapter, prefixed [lattice], since 1.66.0.
Warnings reference › svelte.grid.mountOnly.name
- Identifier
svelte.grid.mountOnly.name- Raised by
- Svelte adapter
- Since
- 1.66.0
What happened
The Svelte component's name prop changed after mount. The name is how a grid publishes itself to the data router and to sibling viewers, and it is fixed at construction; changing the prop cannot re-register a live grid under a new name. The grid keeps its original name and carries on, so anything routing by the new name will not find it.
The fix
Rebuild the component under the new name deliberately, by wrapping it in an {#if}/{#key} block you toggle. If you only wanted a display label, that is not what name is - use your own markup.
The smallest fix
{#key gridName}
<LatticeGrid name={gridName} {columns} {rows} />
{/key}
Reference
Covered in full at the API reference.