@patternfly/react-table 6.3.1-prerelease.3 → 6.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-table",
3
- "version": "6.3.1-prerelease.3",
3
+ "version": "6.3.1",
4
4
  "description": "This library provides a set of React table components for use with the PatternFly 4",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -40,10 +40,10 @@
40
40
  "subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
41
41
  },
42
42
  "dependencies": {
43
- "@patternfly/react-core": "^6.3.1-prerelease.2",
44
- "@patternfly/react-icons": "^6.3.0",
45
- "@patternfly/react-styles": "^6.3.0",
46
- "@patternfly/react-tokens": "^6.3.0",
43
+ "@patternfly/react-core": "^6.3.1",
44
+ "@patternfly/react-icons": "^6.3.1",
45
+ "@patternfly/react-styles": "^6.3.1",
46
+ "@patternfly/react-tokens": "^6.3.1",
47
47
  "lodash": "^4.17.21",
48
48
  "tslib": "^2.8.1"
49
49
  },
@@ -51,5 +51,5 @@
51
51
  "react": "^17 || ^18 || ^19",
52
52
  "react-dom": "^17 || ^18 || ^19"
53
53
  },
54
- "gitHead": "8d65eb8ad40d4d01963d6c3280f48fe3cd709056"
54
+ "gitHead": "08775efb8b882f3b2b6cf7b7221f41154875415b"
55
55
  }
@@ -49,14 +49,14 @@ export const TableSortableResponsive: React.FunctionComponent = () => {
49
49
  const sortRows = (rows: SampleDataRow[], sortIndex: number, sortDirection: Direction) =>
50
50
  [...rows].sort((a, b) => {
51
51
  let returnValue = 0;
52
- if (typeof Object.values(a)[sortIndex] === 'number') {
52
+ if (sortIndex === 0 || sortIndex === 7) {
53
+ returnValue = 1;
54
+ } else if (typeof Object.values(a)[sortIndex] === 'number') {
53
55
  // numeric sort
54
56
  returnValue = Object.values(a)[sortIndex] - Object.values(b)[sortIndex];
55
57
  } else {
56
- // string sort using natural sort
57
- returnValue = Object.values(a)[sortIndex].localeCompare(Object.values(b)[sortIndex], undefined, {
58
- numeric: true
59
- });
58
+ // string sort
59
+ returnValue = Object.values(a)[sortIndex].localeCompare(Object.values(b)[sortIndex]);
60
60
  }
61
61
  if (sortDirection === 'desc') {
62
62
  return returnValue * -1;