return new Person(newPerson)
code
newPerson
contains whatever you wrote on one of the inputs
myObjectInstance = myObjectInstance.propertyOne
How do you handle a bulk save or destroy?
I have something like this: let todos = TodoModel.getList()
and every todo has a checkbox and are stored in a selection DefineList
.
Now I want to delete the selected todo items.
selection.forEach(todo => {
todo.destroy();
});
This results in multiple requests to the backend, how can I group these request?
Do I make a custom funtion in my model bulkDestroy
and then splice them out of my todos list? Or how do you handle this?
destroyedInstance
do? I expected that it would remove my item from the list, but it doesn’t.removeAllItems
function.destroy