next-recomponents 1.4.9 → 1.5.1

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/index.js CHANGED
@@ -32019,7 +32019,9 @@ function HTable(_a) {
32019
32019
  onClick: (e) => __async(null, null, function* () {
32020
32020
  setIsLoading(true);
32021
32021
  yield onSave({ data: values });
32022
- setIsLoading(false);
32022
+ setTimeout(() => {
32023
+ setIsLoading(false);
32024
+ }, 100);
32023
32025
  }),
32024
32026
  children: [
32025
32027
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SaveIcon, {}),
@@ -32394,7 +32396,7 @@ function useResources({
32394
32396
  const options = {
32395
32397
  method: "POST",
32396
32398
  url: `${baseURI}/${key}`,
32397
- data: __spreadValues({}, data),
32399
+ data: Array.isArray(data) ? [...data] : __spreadValues({}, data),
32398
32400
  headers: { Authorization: token }
32399
32401
  };
32400
32402
  const newInfo = __spreadValues({}, info);
@@ -32455,7 +32457,7 @@ function useResources({
32455
32457
  const options = {
32456
32458
  method: "PATCH",
32457
32459
  url: `${baseURI}/${key}/${id3}`,
32458
- data: __spreadValues({}, data),
32460
+ data: Array.isArray(data) ? [...data] : __spreadValues({}, data),
32459
32461
  headers: { Authorization: token }
32460
32462
  };
32461
32463
  const newInfo = __spreadValues({}, info);
package/dist/index.mjs CHANGED
@@ -32007,7 +32007,9 @@ function HTable(_a) {
32007
32007
  onClick: (e) => __async(null, null, function* () {
32008
32008
  setIsLoading(true);
32009
32009
  yield onSave({ data: values });
32010
- setIsLoading(false);
32010
+ setTimeout(() => {
32011
+ setIsLoading(false);
32012
+ }, 100);
32011
32013
  }),
32012
32014
  children: [
32013
32015
  /* @__PURE__ */ jsx11(SaveIcon, {}),
@@ -32384,7 +32386,7 @@ function useResources({
32384
32386
  const options = {
32385
32387
  method: "POST",
32386
32388
  url: `${baseURI}/${key}`,
32387
- data: __spreadValues({}, data),
32389
+ data: Array.isArray(data) ? [...data] : __spreadValues({}, data),
32388
32390
  headers: { Authorization: token }
32389
32391
  };
32390
32392
  const newInfo = __spreadValues({}, info);
@@ -32445,7 +32447,7 @@ function useResources({
32445
32447
  const options = {
32446
32448
  method: "PATCH",
32447
32449
  url: `${baseURI}/${key}/${id3}`,
32448
- data: __spreadValues({}, data),
32450
+ data: Array.isArray(data) ? [...data] : __spreadValues({}, data),
32449
32451
  headers: { Authorization: token }
32450
32452
  };
32451
32453
  const newInfo = __spreadValues({}, info);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.4.9",
3
+ "version": "1.5.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/table/h.tsx CHANGED
@@ -94,7 +94,9 @@ export default function HTable({
94
94
  onClick={async (e) => {
95
95
  setIsLoading(true);
96
96
  await onSave({ data: values });
97
- setIsLoading(false);
97
+ setTimeout(() => {
98
+ setIsLoading(false);
99
+ }, 100);
98
100
  }}
99
101
  >
100
102
  <SaveIcon /> Guardar
@@ -120,7 +120,7 @@ export default function useResources<T extends Record<string, ItemsRecord>>({
120
120
  const options = {
121
121
  method: "POST",
122
122
  url: `${baseURI}/${key}`,
123
- data: { ...data },
123
+ data: Array.isArray(data) ? [...data] : { ...data },
124
124
  headers: { Authorization: token },
125
125
  };
126
126
  const newInfo = { ...info };
@@ -183,7 +183,7 @@ export default function useResources<T extends Record<string, ItemsRecord>>({
183
183
  const options = {
184
184
  method: "PATCH",
185
185
  url: `${baseURI}/${key}/${id}`,
186
- data: { ...data },
186
+ data: Array.isArray(data) ? [...data] : { ...data },
187
187
  headers: { Authorization: token },
188
188
  };
189
189
  const newInfo = { ...info };