@homebound/beam 2.102.6 → 2.102.7

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.
@@ -51,6 +51,11 @@ function deriveSortState(currentSortState, clickedKey, initialSortState) {
51
51
  if (!currentSortState || clickedKey !== currentKey) {
52
52
  return [clickedKey, GridTable_1.ASC];
53
53
  }
54
+ // If there is an `initialSortState` and we're clicking on that same key, then flip the sort.
55
+ // Handles cases where the initial sort is DESC so that we can allow for DESC to ASC sorting.
56
+ if (initialSortState && initialSortState[0] === clickedKey) {
57
+ return [clickedKey, currentDirection === GridTable_1.ASC ? GridTable_1.DESC : GridTable_1.ASC];
58
+ }
54
59
  // Otherwise when clicking the current column, toggle through sort states
55
60
  if (currentDirection === GridTable_1.ASC) {
56
61
  // if ASC -> go to desc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.102.6",
3
+ "version": "2.102.7",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",