@jobber/components 4.60.2-fix-data-l.1 → 4.60.2

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.
@@ -302,12 +302,13 @@ function DataListHeaderTile({ headers, headerKey, }) {
302
302
  React__default["default"].createElement(Text.Text, { maxLines: "single" }, headers[headerKey]),
303
303
  (sortingState === null || sortingState === void 0 ? void 0 : sortingState.key) === headerKey && (React__default["default"].createElement(DataListSortingArrows, { order: sortingState.order }))));
304
304
  function toggleSorting(sortingKey) {
305
- if (sortingKey === (sortingState === null || sortingState === void 0 ? void 0 : sortingState.key) && (sortingState === null || sortingState === void 0 ? void 0 : sortingState.order) === "desc") {
305
+ const isSameKey = sortingKey === (sortingState === null || sortingState === void 0 ? void 0 : sortingState.key);
306
+ if (isSameKey && (sortingState === null || sortingState === void 0 ? void 0 : sortingState.order) === "desc") {
306
307
  sorting === null || sorting === void 0 ? void 0 : sorting.onSort(undefined);
307
308
  return;
308
309
  }
309
310
  sorting === null || sorting === void 0 ? void 0 : sorting.onSort({
310
- order: (sortingState === null || sortingState === void 0 ? void 0 : sortingState.order) === "asc" ? "desc" : "asc",
311
+ order: isSameKey && (sortingState === null || sortingState === void 0 ? void 0 : sortingState.order) === "asc" ? "desc" : "asc",
311
312
  key: sortingKey,
312
313
  });
313
314
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "4.60.2-fix-data-l.1+ede14e74",
3
+ "version": "4.60.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "@jobber/design": "^0.47.0",
23
- "@jobber/formatters": "^0.2.2",
23
+ "@jobber/formatters": "*",
24
24
  "@jobber/hooks": "^2.7.0",
25
25
  "@popperjs/core": "^2.0.6",
26
26
  "@std-proposal/temporal": "0.0.1",
@@ -84,5 +84,5 @@
84
84
  "> 1%",
85
85
  "IE 10"
86
86
  ],
87
- "gitHead": "ede14e74634661d7664e1789ff8508937cb12668"
87
+ "gitHead": "338cc47c611f0ecd674457c667bd8944039b367a"
88
88
  }