Data Router ยท console.warn
a route attached with { writable: true } has no onWrite handler (per-route or router-global); the edit was left in place but not persisted. Pass onWrite to route the write.
Printed by Data Router, prefixed [lattice], since 1.34.0.
Warnings reference › data-router:no-onwrite
- Identifier
data-router:no-onwrite- Raised by
- Data Router
- Since
- 1.34.0
What happened
A writable route took an edit and had nowhere to send it. The edit stays visible in the grid - it is not reverted - but nothing was persisted, so a reload loses it. This is the one write path that leaves the screen ahead of the truth, which is why it is reported.
The fix
Give the route (or the router) an onWrite handler that sends the change to your backend.
The smallest fix
router.attach(grid, { writable: true, onWrite: (c) => api.patch(c.key, { [c.colId]: c.value }) });
Reference
Covered in full at the API reference.