@rivet-health/design-system 40.19.4 → 40.19.5
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.
|
@@ -8185,6 +8185,9 @@ var RivTable;
|
|
|
8185
8185
|
return { actions, state, effects };
|
|
8186
8186
|
}
|
|
8187
8187
|
RivTable.createManager = createManager;
|
|
8188
|
+
function orderEmptyLast(rows, key, direction) {
|
|
8189
|
+
return orderBy(rows, [row => row[key] == null, key], ['asc', direction]);
|
|
8190
|
+
}
|
|
8188
8191
|
function createInMemoryManager(fetchDataset, columns, pluralEntityName, options) {
|
|
8189
8192
|
var _a, _b, _c;
|
|
8190
8193
|
let data;
|
|
@@ -8241,14 +8244,14 @@ var RivTable;
|
|
|
8241
8244
|
const matches = fuse.search(query.search).map(result => result.item);
|
|
8242
8245
|
ordered =
|
|
8243
8246
|
hasExplicitSort && query.order
|
|
8244
|
-
?
|
|
8247
|
+
? orderEmptyLast(matches, orderColumn, query.order.direction)
|
|
8245
8248
|
: matches;
|
|
8246
8249
|
}
|
|
8247
8250
|
else if (hasExplicitSort && query.order) {
|
|
8248
|
-
ordered =
|
|
8251
|
+
ordered = orderEmptyLast(data, orderColumn, query.order.direction);
|
|
8249
8252
|
}
|
|
8250
8253
|
else if (query.order == null && defaultSortSpec) {
|
|
8251
|
-
ordered =
|
|
8254
|
+
ordered = orderEmptyLast(data, defaultSortSpec.key, defaultSortSpec.direction);
|
|
8252
8255
|
}
|
|
8253
8256
|
else {
|
|
8254
8257
|
ordered = data;
|