Data Router ยท console.warn
attach/subscribe target has no rows.apply and is not a function; its slice goes nowhere. Pass a grid or a handler(change) function.
Printed by Data Router, prefixed [lattice], since 1.33.0.
Warnings reference › data-router:bad-target
- Identifier
data-router:bad-target- Raised by
- Data Router
- Since
- 1.33.0
What happened
A route was attached to something the router cannot deliver to. Every target is either a viewer with rows.apply (a grid, a board, a KPI panel) or a plain (change) => {} handler; anything else gets a sink that discards, so the route runs, the metrics count it, and the rows arrive nowhere.
The fix
Pass the viewer itself, or a function that takes the change object.
The smallest fix
router.attach(grid, { where: (row) => row.region === 'EMEA' });
router.subscribe((change) => console.log(change.add.length));
Reference
Covered in full at the API reference.