-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This came up in a conversation on Gitter. The ListView does not have any methods to manipulate rows, only set them ( setRows()
).
Solution:
addRow: row => state => ({rows: [...state.rows, row]}),
removeRowByIndex: index => state => {
const rows = state.rows;
if (index >= 0) {
rows.splice(index, 1)
}
return {rows}
},
removeRow: row => (state, actions) => {
const foundIndex = rows.findIndex(r => r === row);
return actions.removeRowByIndex(foundIndex);
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request