cx 22.10.0 → 22.10.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.
- package/dist/data.js +8 -4
- package/dist/manifest.js +572 -572
- package/dist/ui.js +5 -1
- package/dist/widgets.js +4 -0
- package/package.json +1 -1
- package/src/data/comparer.js +8 -5
- package/src/ui/Instance.js +4 -1
- package/src/widgets/grid/Grid.d.ts +9 -2
- package/src/widgets/grid/Grid.js +4 -0
package/dist/data.js
CHANGED
|
@@ -2004,7 +2004,7 @@ function defaultCompare(av, bv) {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
|
|
2006
2006
|
function getComparer(sorters, dataAccessor, comparer) {
|
|
2007
|
-
var
|
|
2007
|
+
var resolvedSorters = (sorters || []).map(function(s) {
|
|
2008
2008
|
var selector = isDefined(s.value)
|
|
2009
2009
|
? getSelector(s.value)
|
|
2010
2010
|
: s.field
|
|
@@ -2027,12 +2027,16 @@ function getComparer(sorters, dataAccessor, comparer) {
|
|
|
2027
2027
|
return function(a, b) {
|
|
2028
2028
|
var d, av, bv;
|
|
2029
2029
|
|
|
2030
|
-
for (var i = 0; i <
|
|
2031
|
-
d =
|
|
2030
|
+
for (var i = 0; i < resolvedSorters.length; i++) {
|
|
2031
|
+
d = resolvedSorters[i];
|
|
2032
2032
|
av = d.getter(a);
|
|
2033
2033
|
bv = d.getter(b); // show nulls always on the bottom
|
|
2034
2034
|
|
|
2035
|
-
if (av == null)
|
|
2035
|
+
if (av == null) {
|
|
2036
|
+
if (bv == null) continue;
|
|
2037
|
+
else return 1;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2036
2040
|
if (bv == null) return -1;
|
|
2037
2041
|
var r = d.compare(av, bv);
|
|
2038
2042
|
if (r == 0) continue;
|