We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7793550 + f1afe6b commit c11b407Copy full SHA for c11b407
mixins/ApiForm.js
@@ -55,10 +55,10 @@ export default {
55
this.create(saveCallback, errCallback);
56
}
57
},
58
- load(id, errCallback = (err) => {}) {
+ load(id, errCallback = (err) => {}, dataKey) {
59
if (id) {
60
this.$api.get(`${this.route}/${id}/`).then((response) => {
61
- this.requestObj = response.data;
+ this.requestObj = response[dataKey] || response.data;
62
}).catch((err) => {
63
errCallback(err);
64
});
0 commit comments