The grid (core) ยท console.warn
source.mode "stream" requires an open function; the grid will stay empty.
Printed by The grid (core), prefixed [lattice], since 1.0.1.
Warnings reference › source.stream.open
- Identifier
source.stream.open- Raised by
- The grid (core)
- Since
- 1.0.1
What happened
A stream source is driven by an open function that starts the feed and pushes rows in. Without one nothing ever starts and no row ever arrives.
The fix
Supply source.open.
The smallest fix
source: { mode: 'stream', open: ({ push }) => { const ws = new WebSocket(url); ws.onmessage = (e) => push([JSON.parse(e.data)]); return () => ws.close(); } }
Reference
Covered in full at the API reference.