Data Router ยท console.warn
route "{name}" asked its target to remove {n...
Printed by Data Router, prefixed [lattice], since 1.68.0.
Warnings reference › data-router:remove-rejected:*
- Identifier
data-router:remove-rejected:*- Raised by
- Data Router
- Since
- 1.68.0
What happened
The target reported back that it could not apply some removals because it holds no rows under those keys. The router is the only component that can see both sides, so it says so: the rows the route meant to remove are still on screen and will stay there. It is always a key mismatch - the route and the viewer are deriving different keys for the same row.
The fix
Make the route's rowKey produce the same value as the grid's rowKey. A numeric id on one side and its string form on the other is the usual cause.
The smallest fix
router.attach(grid, { rowKey: (row) => String(row.id) }); // and the grid the same
Reference
Covered in full at the API reference.