@@ -458,7 +458,7 @@ export default {
458
458
// Optionally make the event handler async.
459
459
async save({ event, clone, prop, data }) {
460
460
const user = clone.commit()
461
- return user.patch(data)
461
+ return user.patch({ data } )
462
462
}
463
463
}
464
464
}
@@ -497,14 +497,14 @@ myCallback({ event, clone, prop, data }) {
497
497
- `event {Event}`: the event which triggered the `handler` function in the slot scope.
498
498
- `clone {clone}`: the cloned version of the `item` instance that was provided as a prop.
499
499
- `prop {String}`: the name of the `prop` that is being edited (will always match the `prop` prop.)
500
- - `data {Object}`: An object containing the changes that were made to the object. Useful for calling `.patch(data)` on the original instance.
500
+ - `data {Object}`: An object containing the changes that were made to the object. Useful for calling `.patch({ data } )` on the original instance.
501
501
502
502
This callback needs to be customized to fit your business logic. You might patch the changes right away, as shown in this example callback function.
503
503
504
504
```js
505
505
async save({ event, clone, prop, data }) {
506
506
const user = clone.commit()
507
- return user.patch(data)
507
+ return user.patch({ data } )
508
508
}
509
509
```
510
510
@@ -550,7 +550,7 @@ export default {
550
550
// The callback can be async
551
551
async save({ event, clone, prop, data }) {
552
552
const user = clone.commit()
553
- return user.patch(data)
553
+ return user.patch({ data } )
554
554
}
555
555
}
556
556
}
@@ -593,7 +593,7 @@ export default {
593
593
// The callback can be async
594
594
async save({ event, clone, prop, data }) {
595
595
const user = clone.commit()
596
- return user.patch(data)
596
+ return user.patch({ data } )
597
597
}
598
598
}
599
599
}
@@ -640,7 +640,7 @@ export default {
640
640
// The original, non-debounced save function
641
641
async function save({ event, clone, prop, data }) {
642
642
const user = clone.commit()
643
- return user.patch(data)
643
+ return user.patch({ data } )
644
644
}
645
645
// The debounced wrapper around the save function
646
646
const debouncedSave = _debounce(save, 100)
0 commit comments