aq-fe-framework 0.1.548 → 0.1.549
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.
|
@@ -267,10 +267,11 @@ function utils_mantineReactTable_filterColumnsByVisibleKeys(allColumns, visibleF
|
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
function utils_mantineReactTable_sortColumnsByKeyOrder(columns, orderedKeys) {
|
|
270
|
-
if (!orderedKeys) return columns;
|
|
270
|
+
if (!orderedKeys || orderedKeys.length === 0) return columns;
|
|
271
271
|
return [...columns].sort((a, b) => {
|
|
272
|
-
|
|
273
|
-
const
|
|
272
|
+
var _a, _b;
|
|
273
|
+
const aKey = (_a = a.accessorKey) != null ? _a : a.id;
|
|
274
|
+
const bKey = (_b = b.accessorKey) != null ? _b : b.id;
|
|
274
275
|
const aIndex = orderedKeys.indexOf(aKey);
|
|
275
276
|
const bIndex = orderedKeys.indexOf(bKey);
|
|
276
277
|
return (aIndex === -1 ? Infinity : aIndex) - (bIndex === -1 ? Infinity : bIndex);
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -52,7 +52,7 @@ declare function utils_list_hasEmptyField<T>(list: T[], field: keyof T): boolean
|
|
|
52
52
|
declare function utils_list_sumField<T>(list: T[], field: keyof T): number;
|
|
53
53
|
|
|
54
54
|
declare function utils_mantineReactTable_filterColumnsByVisibleKeys<T extends MRT_RowData>(allColumns: MRT_ColumnDef<T>[], visibleFields?: (keyof T | string)[]): MRT_ColumnDef<T>[];
|
|
55
|
-
declare function utils_mantineReactTable_sortColumnsByKeyOrder<T extends MRT_RowData>(columns: MRT_ColumnDef<T>[], orderedKeys?: (keyof T)[]): MRT_ColumnDef<T>[];
|
|
55
|
+
declare function utils_mantineReactTable_sortColumnsByKeyOrder<T extends MRT_RowData>(columns: MRT_ColumnDef<T>[], orderedKeys?: (keyof T | string)[]): MRT_ColumnDef<T>[];
|
|
56
56
|
|
|
57
57
|
interface I {
|
|
58
58
|
crudType?: "delete" | "update" | "create" | "error" | "importSucess";
|
package/dist/utils/index.mjs
CHANGED