Lattice Grid Buy a licence

The grid (core) ยท console.warn

edit.deleteRows (and the Delete-key / "Delet...

Printed by The grid (core), prefixed [lattice], since 1.38.0.

Warnings reference › grid.edit.deleteRows.disabled

Identifier
grid.edit.deleteRows.disabled
Raised by
The grid (core)
Since
1.38.0

What happened

Row deletion is opt-in: a grid does not remove data because someone pressed a key. With rowDelete unset the call - and the Delete-key and context-menu gestures - return an empty array and nothing is deleted.

The fix

Set rowDelete: true, and use beforeDelete to confirm or veto.

The smallest fix

createGrid(el, { rowDelete: true });
grid.on('beforeDelete', (e) => { if (!confirm('Delete?')) e.preventDefault(); });

Reference

Covered in full at the API reference.