Row Add
Adds new rows at the top, at the bottom, or through a pinned 'new row' placeholder. New rows get default values and temporary IDs. New rows have to be easy to create and easy to tell apart from saved ones.
Planned. This page shows the specification from issue #193. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
An expenses grid with an 'Add row' button.
Expected behavior
New rows appear in the chosen position with default values and a 'new' marker. Typing in the placeholder row creates a real row. New rows stay visible even if the active filters would hide them.
Planned API surface
addRow(data?, position?)newRowPlaceholderdefaultRowValues(fn)getTempIdonRowAddedrowState: 'new'Acceptance criteria
- New rows receive a temporary ID that can be swapped for the server ID later. (pending)
- defaultRowValues runs for each new row. (pending)
- Cancelling a new row that was never edited removes it. (pending)
- New rows count as dirty in getChanges with the type 'add'. (pending)