@quillsql/react 2.16.8 → 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 +4 -3
- package/dist/index.js +4 -3
- package/package.json +1 -1
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.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
|
});
|