@quillsql/react 2.16.7 → 2.16.9

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.cjs CHANGED
@@ -16101,13 +16101,14 @@ async function generatePivotWithSQL({
16101
16101
  }
16102
16102
  }
16103
16103
  }
16104
- if (!pivot.sort) {
16104
+ if (!pivot.sort || pivot.sortField === pivot.rowField) {
16105
16105
  rows.sort((a, b) => {
16106
+ const direction = pivot.sort && pivot.sortDirection === "DESC" ? -1 : 1;
16106
16107
  if (a.__quillRawDate < b.__quillRawDate) {
16107
- return -1;
16108
+ return -1 * direction;
16108
16109
  }
16109
16110
  if (a.__quillRawDate > b.__quillRawDate) {
16110
- return 1;
16111
+ return 1 * direction;
16111
16112
  }
16112
16113
  return 0;
16113
16114
  });
package/dist/index.d.cts CHANGED
@@ -1483,7 +1483,6 @@ interface TableProps {
1483
1483
  rows?: {
1484
1484
  [key: string]: any;
1485
1485
  }[];
1486
- autoHide?: boolean;
1487
1486
  /**
1488
1487
  * The columns of the table to show, if any.
1489
1488
  *
package/dist/index.d.ts CHANGED
@@ -1483,7 +1483,6 @@ interface TableProps {
1483
1483
  rows?: {
1484
1484
  [key: string]: any;
1485
1485
  }[];
1486
- autoHide?: boolean;
1487
1486
  /**
1488
1487
  * The columns of the table to show, if any.
1489
1488
  *
package/dist/index.js CHANGED
@@ -16138,13 +16138,14 @@ async function generatePivotWithSQL({
16138
16138
  }
16139
16139
  }
16140
16140
  }
16141
- if (!pivot.sort) {
16141
+ if (!pivot.sort || pivot.sortField === pivot.rowField) {
16142
16142
  rows.sort((a, b) => {
16143
+ const direction = pivot.sort && pivot.sortDirection === "DESC" ? -1 : 1;
16143
16144
  if (a.__quillRawDate < b.__quillRawDate) {
16144
- return -1;
16145
+ return -1 * direction;
16145
16146
  }
16146
16147
  if (a.__quillRawDate > b.__quillRawDate) {
16147
- return 1;
16148
+ return 1 * direction;
16148
16149
  }
16149
16150
  return 0;
16150
16151
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "2.16.7",
3
+ "version": "2.16.9",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {