@tanstack/table-core 8.10.5 → 8.10.6

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.
@@ -2337,6 +2337,9 @@ function compareBasic(a, b) {
2337
2337
  return a === b ? 0 : a > b ? 1 : -1;
2338
2338
  }
2339
2339
  function toString(a) {
2340
+ if (typeof a === 'boolean') {
2341
+ return String(a);
2342
+ }
2340
2343
  if (typeof a === 'number') {
2341
2344
  if (isNaN(a) || a === Infinity || a === -Infinity) {
2342
2345
  return '';
@@ -2353,6 +2356,13 @@ function toString(a) {
2353
2356
  // It handles numbers, mixed alphanumeric combinations, and even
2354
2357
  // null, undefined, and Infinity
2355
2358
  function compareAlphanumeric(aStr, bStr) {
2359
+ // Check if the string contains only a number
2360
+ const aFloat = parseFloat(aStr);
2361
+ const bFloat = parseFloat(bStr);
2362
+ if (!isNaN(aFloat) && !isNaN(bFloat)) {
2363
+ return compareBasic(aFloat, bFloat);
2364
+ }
2365
+
2356
2366
  // Split on number groups, but keep the delimiter
2357
2367
  // Then remove falsey split values
2358
2368
  const a = aStr.split(reSplitAlphaNumeric).filter(Boolean);