next-recomponents 1.9.55 → 1.9.56
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 +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +1 -1
- package/src/table3/body.tsx +8 -2
package/dist/index.js
CHANGED
|
@@ -46061,8 +46061,12 @@ function TableBody({
|
|
|
46061
46061
|
for (const [key, order] of Object.entries(
|
|
46062
46062
|
sort || { id: "desc", _id: "desc" }
|
|
46063
46063
|
)) {
|
|
46064
|
-
|
|
46065
|
-
|
|
46064
|
+
let valA = a[key];
|
|
46065
|
+
let valB = b[key];
|
|
46066
|
+
if (!isNaN(Number(valA)) && !isNaN(Number(valB))) {
|
|
46067
|
+
valA = Number(valA);
|
|
46068
|
+
valB = Number(valB);
|
|
46069
|
+
}
|
|
46066
46070
|
if (valA === valB) continue;
|
|
46067
46071
|
const comparison = valA > valB ? 1 : valA < valB ? -1 : 0;
|
|
46068
46072
|
return order === "desc" ? -comparison : comparison;
|
package/dist/index.mjs
CHANGED
|
@@ -46058,8 +46058,12 @@ function TableBody({
|
|
|
46058
46058
|
for (const [key, order] of Object.entries(
|
|
46059
46059
|
sort || { id: "desc", _id: "desc" }
|
|
46060
46060
|
)) {
|
|
46061
|
-
|
|
46062
|
-
|
|
46061
|
+
let valA = a[key];
|
|
46062
|
+
let valB = b[key];
|
|
46063
|
+
if (!isNaN(Number(valA)) && !isNaN(Number(valB))) {
|
|
46064
|
+
valA = Number(valA);
|
|
46065
|
+
valB = Number(valB);
|
|
46066
|
+
}
|
|
46063
46067
|
if (valA === valB) continue;
|
|
46064
46068
|
const comparison = valA > valB ? 1 : valA < valB ? -1 : 0;
|
|
46065
46069
|
return order === "desc" ? -comparison : comparison;
|
package/package.json
CHANGED
package/src/table3/body.tsx
CHANGED
|
@@ -40,8 +40,14 @@ export default function TableBody({
|
|
|
40
40
|
for (const [key, order] of Object.entries(
|
|
41
41
|
sort || { id: "desc", _id: "desc" }
|
|
42
42
|
)) {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
let valA = a[key];
|
|
44
|
+
let valB = b[key];
|
|
45
|
+
|
|
46
|
+
// convertir a número si ambos son numéricos
|
|
47
|
+
if (!isNaN(Number(valA)) && !isNaN(Number(valB))) {
|
|
48
|
+
valA = Number(valA);
|
|
49
|
+
valB = Number(valB);
|
|
50
|
+
}
|
|
45
51
|
|
|
46
52
|
if (valA === valB) continue; // pasa al siguiente criterio
|
|
47
53
|
|