lkt-item-crud 1.1.10 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.js
CHANGED
|
@@ -91,7 +91,7 @@ const p = (...u) => {
|
|
|
91
91
|
m.value = !0;
|
|
92
92
|
}
|
|
93
93
|
let b = a.value ? "create" : "update";
|
|
94
|
-
a.value || (p("onSave -> turn stored data into original"), k.value.turnStoredIntoOriginal()),
|
|
94
|
+
a.value || (p("onSave -> turn stored data into original"), k.value.turnStoredIntoOriginal()), b === "create" ? typeof e.onCreate == "function" && (p("onSave -> trigger onCreate callback"), e.onCreate(l)) : typeof e.onUpdate == "function" && (p("onSave -> trigger onUpdate callback"), e.onUpdate(l)), l.autoReloadId && (p("onSave -> autoReloadId detected: ", l.autoReloadId), e.readData.id = l.autoReloadId, p("onSave -> turning off create mode"), a.value = !1, U()), n(b, l);
|
|
95
95
|
}, J = () => {
|
|
96
96
|
o.value = !0, i.value = -1;
|
|
97
97
|
}, F = () => {
|
package/package.json
CHANGED
|
@@ -192,13 +192,6 @@ const onDrop = ($event: PointerEvent, r: HTTPResponse) => {
|
|
|
192
192
|
dataState.value.turnStoredIntoOriginal();
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
if (r.autoReloadId) {
|
|
196
|
-
debug('onSave -> autoReloadId detected: ', r.autoReloadId);
|
|
197
|
-
props.readData['id'] = r.autoReloadId;
|
|
198
|
-
debug('onSave -> turning off create mode');
|
|
199
|
-
createMode.value = false;
|
|
200
|
-
fetchItem();
|
|
201
|
-
}
|
|
202
195
|
if (emits === 'create') {
|
|
203
196
|
if (typeof props.onCreate === 'function') {
|
|
204
197
|
debug('onSave -> trigger onCreate callback');
|
|
@@ -210,6 +203,14 @@ const onDrop = ($event: PointerEvent, r: HTTPResponse) => {
|
|
|
210
203
|
props.onUpdate(r);
|
|
211
204
|
}
|
|
212
205
|
}
|
|
206
|
+
|
|
207
|
+
if (r.autoReloadId) {
|
|
208
|
+
debug('onSave -> autoReloadId detected: ', r.autoReloadId);
|
|
209
|
+
props.readData['id'] = r.autoReloadId;
|
|
210
|
+
debug('onSave -> turning off create mode');
|
|
211
|
+
createMode.value = false;
|
|
212
|
+
fetchItem();
|
|
213
|
+
}
|
|
213
214
|
emit(emits, r)
|
|
214
215
|
},
|
|
215
216
|
onButtonLoading = () => {
|