aq-fe-framework 0.1.412 → 0.1.414
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.
|
@@ -227,21 +227,7 @@ function MyButtonCreateUpdate({
|
|
|
227
227
|
const queryClient = useQueryClient();
|
|
228
228
|
const mutation = useMyReactMutation({
|
|
229
229
|
axiosFn: (values) => {
|
|
230
|
-
|
|
231
|
-
if (result === void 0) {
|
|
232
|
-
return Promise.resolve({
|
|
233
|
-
data: {
|
|
234
|
-
message: "T\u1EA1o th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
|
|
235
|
-
data: {},
|
|
236
|
-
isSuccess: 1
|
|
237
|
-
},
|
|
238
|
-
status: 200,
|
|
239
|
-
statusText: "OK",
|
|
240
|
-
headers: {},
|
|
241
|
-
config: {}
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
return result;
|
|
230
|
+
return values;
|
|
245
231
|
},
|
|
246
232
|
options: {
|
|
247
233
|
onSuccess: (...args) => {
|
|
@@ -296,8 +282,23 @@ function MyButtonCreateUpdate({
|
|
|
296
282
|
{
|
|
297
283
|
onSubmit: form.onSubmit((values) => {
|
|
298
284
|
const result = onSubmit(values);
|
|
299
|
-
|
|
300
|
-
|
|
285
|
+
let axiosPromise;
|
|
286
|
+
if (result == false) return;
|
|
287
|
+
if (result == void 0) {
|
|
288
|
+
axiosPromise = Promise.resolve({
|
|
289
|
+
data: {
|
|
290
|
+
message: "T\u1EA1o th\xE0nh c\xF4ng (gi\u1EA3 l\u1EADp)",
|
|
291
|
+
data: {},
|
|
292
|
+
isSuccess: 1
|
|
293
|
+
},
|
|
294
|
+
status: 200,
|
|
295
|
+
statusText: "OK",
|
|
296
|
+
headers: {},
|
|
297
|
+
config: {}
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
axiosPromise = result;
|
|
301
|
+
mutation.mutate(axiosPromise);
|
|
301
302
|
}),
|
|
302
303
|
children: [
|
|
303
304
|
/* @__PURE__ */ jsx4(
|
package/dist/core/index.mjs
CHANGED