aq-fe-framework 0.1.926 → 0.1.927

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.
@@ -50,4 +50,4 @@ interface MyDataTableProps<TData extends MRT_RowData> extends MRT_TableOptions<T
50
50
  }
51
51
  declare function MyDataTable<TData extends MRT_RowData>({ rowActionSize, columns, data, setSelectedRow, isError, isLoading, pagination, idSelectionOne, setIdSelectionOne, renderTopToolbarCustomActions, visibleFields, ...rest }: MyDataTableProps<TData>): react_jsx_runtime.JSX.Element;
52
52
 
53
- export { type MyActionIconProps as M, type PaginationState as P, type MyButtonProps as a, type MyButtonModalProps as b, type MyDataTableProps as c, MyActionIcon as d, MyButton as e, MyButtonModal as f, type MyDataTableInternalProps as g, MyDataTable as h };
53
+ export { MyButtonModal as M, type PaginationState as P, type MyDataTableInternalProps as a, type MyDataTableProps as b, MyDataTable as c, type MyActionIconProps as d, type MyButtonProps as e, type MyButtonModalProps as f, MyActionIcon as g, MyButton as h };
@@ -183,6 +183,9 @@ function useConfig({
183
183
  // src/hooks/custom-hooks/useMyReactMutation.ts
184
184
  import { notifications } from "@mantine/notifications";
185
185
  import { useMutation, useQueryClient } from "@tanstack/react-query";
186
+ function isObject(data) {
187
+ return typeof data === "object" && data !== null && !Array.isArray(data);
188
+ }
186
189
  function useMyReactMutation({
187
190
  isPrototype,
188
191
  axiosFn,
@@ -223,11 +226,12 @@ function useMyReactMutation({
223
226
  parsed = null;
224
227
  }
225
228
  if (enableDefaultError) {
226
- notifications.show({
227
- message: (parsed == null ? void 0 : parsed.message) || "Kh\xF4ng th\u1EC3 thao t\xE1c, l\u1ED7i ch\u01B0a x\xE1c \u0111\u1ECBnh!",
228
- color: "red"
229
- });
230
- return;
229
+ if (!isObject(parsed)) {
230
+ notifications.show({
231
+ message: (parsed == null ? void 0 : parsed.message) || "Kh\xF4ng th\u1EC3 thao t\xE1c, l\u1ED7i ch\u01B0a x\xE1c \u0111\u1ECBnh!",
232
+ color: "red"
233
+ });
234
+ }
231
235
  }
232
236
  (_a = options == null ? void 0 : options.onError) == null ? void 0 : _a.call(options, error, variables, context);
233
237
  }