delRow
The delRow
method lets you remove a single Row
from a Table
.
delRow(
tableId: Id,
rowId: Id,
): Store
If this is the last Row
in its Table
, then that Table
will be removed.
Example
This example removes a Row
from a Table
.
const store = createStore().setTables({
pets: {fido: {species: 'dog'}, felix: {species: 'cat'}},
});
store.delRow('pets', 'fido');
console.log(store.getTables());
// -> {pets: {felix: {species: 'cat'}}}