Troubleshooting
The grid is blank
Section titled “The grid is blank”Confirm that the stylesheet is imported and the grid host has a resolved height.
import 'mosyn/style.css';.dashboard-host { display: flex; min-height: 0; height: 100vh;}See Getting started for the complete height chain.
A tile resets after another component renders
Section titled “A tile resets after another component renders”Keep the tiles array reference stable. Define static tiles outside the component or memoize derived tiles.
const tiles = useMemo(() => createTiles(), []);
return <Mosyn tiles={tiles} />;Do not construct a new array inline on every render.
Buttons or inputs start a drag
Section titled “Buttons or inputs start a drag”Add their selectors to DragCancel.
<Mosyn tiles={tiles} DragCancel={['button', 'input', 'select', '.no-drag']} />A nested grid does not appear
Section titled “A nested grid does not appear”Confirm all three parts of the container pattern:
- The parent tile uses
isContainer: true. - The parent tile has
children. - Its renderer returns
<Mosyn tiles={tile.children ?? []} container={tile} />.
Read Nested grids for the complete example.
useGridStore returns no value
Section titled “useGridStore returns no value”The hook must be rendered below MosynManager. It can also be temporarily unavailable before the requested grid has mounted, so handle a missing value when reading a nested grid.
Resize handles are not visible
Section titled “Resize handles are not visible”Select a tile first. Mosyn reveals resize handles for the selected tile. Use a current browser with CSS :has() support; the handle visibility rule depends on it.