@tanstack/table-core
Advanced tools
Comparing version 8.0.0-alpha.11 to 8.0.0-alpha.12
@@ -55,2 +55,5 @@ /** | ||
}, | ||
resetSorting: function resetSorting() { | ||
return instance.resetSorting(column.id); | ||
}, | ||
toggleSorting: function toggleSorting(desc, isMulti) { | ||
@@ -265,6 +268,14 @@ return instance.toggleColumnSorting(column.id, desc, isMulti); | ||
}, | ||
resetSorting: function resetSorting() { | ||
var _instance$initialStat, _instance$initialStat2; | ||
resetSorting: function resetSorting(columnId) { | ||
if (columnId) { | ||
instance.setSorting(function (old) { | ||
return old != null && old.length ? old.filter(function (d) { | ||
return d.id !== columnId; | ||
}) : []; | ||
}); | ||
} else { | ||
var _instance$initialStat, _instance$initialStat2; | ||
instance.setSorting((_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []); | ||
instance.setSorting((_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []); | ||
} | ||
}, | ||
@@ -271,0 +282,0 @@ getToggleSortingProps: function getToggleSortingProps(columnId, userProps) { |
@@ -10,3 +10,3 @@ { | ||
{ | ||
"uid": "ff18-54", | ||
"uid": "722d-54", | ||
"name": "\u0000rollupPluginBabelHelpers.js" | ||
@@ -18,7 +18,7 @@ }, | ||
{ | ||
"uid": "ff18-56", | ||
"uid": "722d-56", | ||
"name": "utils.tsx" | ||
}, | ||
{ | ||
"uid": "ff18-58", | ||
"uid": "722d-58", | ||
"name": "types.ts" | ||
@@ -30,43 +30,43 @@ }, | ||
{ | ||
"uid": "ff18-60", | ||
"uid": "722d-60", | ||
"name": "Visibility.ts" | ||
}, | ||
{ | ||
"uid": "ff18-64", | ||
"uid": "722d-64", | ||
"name": "Grouping.ts" | ||
}, | ||
{ | ||
"uid": "ff18-66", | ||
"uid": "722d-66", | ||
"name": "Ordering.ts" | ||
}, | ||
{ | ||
"uid": "ff18-68", | ||
"uid": "722d-68", | ||
"name": "Pinning.ts" | ||
}, | ||
{ | ||
"uid": "ff18-70", | ||
"uid": "722d-70", | ||
"name": "ColumnSizing.ts" | ||
}, | ||
{ | ||
"uid": "ff18-72", | ||
"uid": "722d-72", | ||
"name": "Headers.ts" | ||
}, | ||
{ | ||
"uid": "ff18-76", | ||
"uid": "722d-76", | ||
"name": "Filters.ts" | ||
}, | ||
{ | ||
"uid": "ff18-80", | ||
"uid": "722d-80", | ||
"name": "Sorting.ts" | ||
}, | ||
{ | ||
"uid": "ff18-82", | ||
"uid": "722d-82", | ||
"name": "Expanding.ts" | ||
}, | ||
{ | ||
"uid": "ff18-84", | ||
"uid": "722d-84", | ||
"name": "Pagination.ts" | ||
}, | ||
{ | ||
"uid": "ff18-86", | ||
"uid": "722d-86", | ||
"name": "RowSelection.ts" | ||
@@ -77,19 +77,19 @@ } | ||
{ | ||
"uid": "ff18-62", | ||
"uid": "722d-62", | ||
"name": "aggregationTypes.ts" | ||
}, | ||
{ | ||
"uid": "ff18-74", | ||
"uid": "722d-74", | ||
"name": "filterTypes.ts" | ||
}, | ||
{ | ||
"uid": "ff18-78", | ||
"uid": "722d-78", | ||
"name": "sortTypes.ts" | ||
}, | ||
{ | ||
"uid": "ff18-88", | ||
"uid": "722d-88", | ||
"name": "core.tsx" | ||
}, | ||
{ | ||
"uid": "ff18-90", | ||
"uid": "722d-90", | ||
"name": "createTable.tsx" | ||
@@ -101,23 +101,23 @@ }, | ||
{ | ||
"uid": "ff18-92", | ||
"uid": "722d-92", | ||
"name": "columnFilterRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "ff18-94", | ||
"uid": "722d-94", | ||
"name": "globalFilterRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "ff18-96", | ||
"uid": "722d-96", | ||
"name": "sortRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "ff18-98", | ||
"uid": "722d-98", | ||
"name": "groupRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "ff18-100", | ||
"uid": "722d-100", | ||
"name": "expandRowsFn.ts" | ||
}, | ||
{ | ||
"uid": "ff18-102", | ||
"uid": "722d-102", | ||
"name": "paginateRowsFn.ts" | ||
@@ -128,3 +128,3 @@ } | ||
{ | ||
"uid": "ff18-104", | ||
"uid": "722d-104", | ||
"name": "index.tsx" | ||
@@ -140,164 +140,164 @@ } | ||
"nodeParts": { | ||
"ff18-54": { | ||
"722d-54": { | ||
"renderedLength": 2695, | ||
"gzipLength": 1065, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-53" | ||
"mainUid": "722d-53" | ||
}, | ||
"ff18-56": { | ||
"722d-56": { | ||
"renderedLength": 4669, | ||
"gzipLength": 1600, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-55" | ||
"mainUid": "722d-55" | ||
}, | ||
"ff18-58": { | ||
"722d-58": { | ||
"renderedLength": 166, | ||
"gzipLength": 144, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-57" | ||
"mainUid": "722d-57" | ||
}, | ||
"ff18-60": { | ||
"722d-60": { | ||
"renderedLength": 6367, | ||
"gzipLength": 1219, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-59" | ||
"mainUid": "722d-59" | ||
}, | ||
"ff18-62": { | ||
"722d-62": { | ||
"renderedLength": 2520, | ||
"gzipLength": 755, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-61" | ||
"mainUid": "722d-61" | ||
}, | ||
"ff18-64": { | ||
"722d-64": { | ||
"renderedLength": 7933, | ||
"gzipLength": 1720, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-63" | ||
"mainUid": "722d-63" | ||
}, | ||
"ff18-66": { | ||
"722d-66": { | ||
"renderedLength": 2639, | ||
"gzipLength": 799, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-65" | ||
"mainUid": "722d-65" | ||
}, | ||
"ff18-68": { | ||
"722d-68": { | ||
"renderedLength": 5479, | ||
"gzipLength": 1030, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-67" | ||
"mainUid": "722d-67" | ||
}, | ||
"ff18-70": { | ||
"722d-70": { | ||
"renderedLength": 10861, | ||
"gzipLength": 2159, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-69" | ||
"mainUid": "722d-69" | ||
}, | ||
"ff18-72": { | ||
"722d-72": { | ||
"renderedLength": 23599, | ||
"gzipLength": 3363, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-71" | ||
"mainUid": "722d-71" | ||
}, | ||
"ff18-74": { | ||
"722d-74": { | ||
"renderedLength": 4437, | ||
"gzipLength": 786, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-73" | ||
"mainUid": "722d-73" | ||
}, | ||
"ff18-76": { | ||
"722d-76": { | ||
"renderedLength": 16477, | ||
"gzipLength": 2909, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-75" | ||
"mainUid": "722d-75" | ||
}, | ||
"ff18-78": { | ||
"722d-78": { | ||
"renderedLength": 2752, | ||
"gzipLength": 846, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-77" | ||
"mainUid": "722d-77" | ||
}, | ||
"ff18-80": { | ||
"renderedLength": 11708, | ||
"gzipLength": 2560, | ||
"722d-80": { | ||
"renderedLength": 12092, | ||
"gzipLength": 2589, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-79" | ||
"mainUid": "722d-79" | ||
}, | ||
"ff18-82": { | ||
"722d-82": { | ||
"renderedLength": 7896, | ||
"gzipLength": 1718, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-81" | ||
"mainUid": "722d-81" | ||
}, | ||
"ff18-84": { | ||
"722d-84": { | ||
"renderedLength": 6386, | ||
"gzipLength": 1279, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-83" | ||
"mainUid": "722d-83" | ||
}, | ||
"ff18-86": { | ||
"722d-86": { | ||
"renderedLength": 18164, | ||
"gzipLength": 3123, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-85" | ||
"mainUid": "722d-85" | ||
}, | ||
"ff18-88": { | ||
"722d-88": { | ||
"renderedLength": 17695, | ||
"gzipLength": 3452, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-87" | ||
"mainUid": "722d-87" | ||
}, | ||
"ff18-90": { | ||
"722d-90": { | ||
"renderedLength": 1145, | ||
"gzipLength": 364, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-89" | ||
"mainUid": "722d-89" | ||
}, | ||
"ff18-92": { | ||
"722d-92": { | ||
"renderedLength": 3174, | ||
"gzipLength": 863, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-91" | ||
"mainUid": "722d-91" | ||
}, | ||
"ff18-94": { | ||
"722d-94": { | ||
"renderedLength": 2540, | ||
"gzipLength": 721, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-93" | ||
"mainUid": "722d-93" | ||
}, | ||
"ff18-96": { | ||
"722d-96": { | ||
"renderedLength": 2436, | ||
"gzipLength": 818, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-95" | ||
"mainUid": "722d-95" | ||
}, | ||
"ff18-98": { | ||
"722d-98": { | ||
"renderedLength": 4814, | ||
"gzipLength": 1358, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-97" | ||
"mainUid": "722d-97" | ||
}, | ||
"ff18-100": { | ||
"722d-100": { | ||
"renderedLength": 595, | ||
"gzipLength": 266, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-99" | ||
"mainUid": "722d-99" | ||
}, | ||
"ff18-102": { | ||
"722d-102": { | ||
"renderedLength": 720, | ||
"gzipLength": 281, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-101" | ||
"mainUid": "722d-101" | ||
}, | ||
"ff18-104": { | ||
"722d-104": { | ||
"renderedLength": 0, | ||
"gzipLength": 0, | ||
"brotliLength": 0, | ||
"mainUid": "ff18-103" | ||
"mainUid": "722d-103" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"ff18-53": { | ||
"722d-53": { | ||
"id": "\u0000rollupPluginBabelHelpers.js", | ||
"moduleParts": { | ||
"index.production.js": "ff18-54" | ||
"index.production.js": "722d-54" | ||
}, | ||
@@ -307,44 +307,44 @@ "imported": [], | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
}, | ||
{ | ||
"uid": "ff18-89" | ||
"uid": "722d-89" | ||
}, | ||
{ | ||
"uid": "ff18-69" | ||
"uid": "722d-69" | ||
}, | ||
{ | ||
"uid": "ff18-81" | ||
"uid": "722d-81" | ||
}, | ||
{ | ||
"uid": "ff18-83" | ||
"uid": "722d-83" | ||
}, | ||
{ | ||
"uid": "ff18-85" | ||
"uid": "722d-85" | ||
}, | ||
{ | ||
"uid": "ff18-79" | ||
"uid": "722d-79" | ||
}, | ||
{ | ||
"uid": "ff18-59" | ||
"uid": "722d-59" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
}, | ||
{ | ||
"uid": "ff18-61" | ||
"uid": "722d-61" | ||
} | ||
] | ||
}, | ||
"ff18-55": { | ||
"722d-55": { | ||
"id": "/packages/table-core/src/utils.tsx", | ||
"moduleParts": { | ||
"index.production.js": "ff18-56" | ||
"index.production.js": "722d-56" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
}, | ||
{ | ||
"uid": "ff18-105" | ||
"uid": "722d-105" | ||
} | ||
@@ -354,49 +354,49 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
}, | ||
{ | ||
"uid": "ff18-69" | ||
"uid": "722d-69" | ||
}, | ||
{ | ||
"uid": "ff18-81" | ||
"uid": "722d-81" | ||
}, | ||
{ | ||
"uid": "ff18-75" | ||
"uid": "722d-75" | ||
}, | ||
{ | ||
"uid": "ff18-63" | ||
"uid": "722d-63" | ||
}, | ||
{ | ||
"uid": "ff18-71" | ||
"uid": "722d-71" | ||
}, | ||
{ | ||
"uid": "ff18-65" | ||
"uid": "722d-65" | ||
}, | ||
{ | ||
"uid": "ff18-83" | ||
"uid": "722d-83" | ||
}, | ||
{ | ||
"uid": "ff18-67" | ||
"uid": "722d-67" | ||
}, | ||
{ | ||
"uid": "ff18-85" | ||
"uid": "722d-85" | ||
}, | ||
{ | ||
"uid": "ff18-79" | ||
"uid": "722d-79" | ||
}, | ||
{ | ||
"uid": "ff18-59" | ||
"uid": "722d-59" | ||
}, | ||
{ | ||
"uid": "ff18-97" | ||
"uid": "722d-97" | ||
} | ||
] | ||
}, | ||
"ff18-57": { | ||
"722d-57": { | ||
"id": "/packages/table-core/src/types.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-58" | ||
"index.production.js": "722d-58" | ||
}, | ||
@@ -406,20 +406,20 @@ "imported": [], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-59": { | ||
"722d-59": { | ||
"id": "/packages/table-core/src/features/Visibility.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-60" | ||
"index.production.js": "722d-60" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -429,17 +429,17 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-61": { | ||
"722d-61": { | ||
"id": "/packages/table-core/src/aggregationTypes.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-62" | ||
"index.production.js": "722d-62" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
} | ||
@@ -449,17 +449,17 @@ ], | ||
{ | ||
"uid": "ff18-63" | ||
"uid": "722d-63" | ||
} | ||
] | ||
}, | ||
"ff18-63": { | ||
"722d-63": { | ||
"id": "/packages/table-core/src/features/Grouping.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-64" | ||
"index.production.js": "722d-64" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-61" | ||
"uid": "722d-61" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -469,23 +469,23 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
}, | ||
{ | ||
"uid": "ff18-65" | ||
"uid": "722d-65" | ||
} | ||
] | ||
}, | ||
"ff18-65": { | ||
"722d-65": { | ||
"id": "/packages/table-core/src/features/Ordering.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-66" | ||
"index.production.js": "722d-66" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
}, | ||
{ | ||
"uid": "ff18-63" | ||
"uid": "722d-63" | ||
} | ||
@@ -495,17 +495,17 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-67": { | ||
"722d-67": { | ||
"id": "/packages/table-core/src/features/Pinning.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-68" | ||
"index.production.js": "722d-68" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -515,20 +515,20 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-69": { | ||
"722d-69": { | ||
"id": "/packages/table-core/src/features/ColumnSizing.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-70" | ||
"index.production.js": "722d-70" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -538,23 +538,23 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
}, | ||
{ | ||
"uid": "ff18-71" | ||
"uid": "722d-71" | ||
} | ||
] | ||
}, | ||
"ff18-71": { | ||
"722d-71": { | ||
"id": "/packages/table-core/src/features/Headers.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-72" | ||
"index.production.js": "722d-72" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
}, | ||
{ | ||
"uid": "ff18-69" | ||
"uid": "722d-69" | ||
} | ||
@@ -564,13 +564,13 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-73": { | ||
"722d-73": { | ||
"id": "/packages/table-core/src/filterTypes.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-74" | ||
"index.production.js": "722d-74" | ||
}, | ||
@@ -580,17 +580,17 @@ "imported": [], | ||
{ | ||
"uid": "ff18-75" | ||
"uid": "722d-75" | ||
} | ||
] | ||
}, | ||
"ff18-75": { | ||
"722d-75": { | ||
"id": "/packages/table-core/src/features/Filters.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-76" | ||
"index.production.js": "722d-76" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-73" | ||
"uid": "722d-73" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -600,13 +600,13 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-77": { | ||
"722d-77": { | ||
"id": "/packages/table-core/src/sortTypes.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-78" | ||
"index.production.js": "722d-78" | ||
}, | ||
@@ -616,20 +616,20 @@ "imported": [], | ||
{ | ||
"uid": "ff18-79" | ||
"uid": "722d-79" | ||
} | ||
] | ||
}, | ||
"ff18-79": { | ||
"722d-79": { | ||
"id": "/packages/table-core/src/features/Sorting.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-80" | ||
"index.production.js": "722d-80" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
}, | ||
{ | ||
"uid": "ff18-77" | ||
"uid": "722d-77" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -639,20 +639,20 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-81": { | ||
"722d-81": { | ||
"id": "/packages/table-core/src/features/Expanding.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-82" | ||
"index.production.js": "722d-82" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -662,20 +662,20 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-83": { | ||
"722d-83": { | ||
"id": "/packages/table-core/src/features/Pagination.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-84" | ||
"index.production.js": "722d-84" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -685,20 +685,20 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-85": { | ||
"722d-85": { | ||
"id": "/packages/table-core/src/features/RowSelection.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-86" | ||
"index.production.js": "722d-86" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -708,56 +708,56 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
} | ||
] | ||
}, | ||
"ff18-87": { | ||
"722d-87": { | ||
"id": "/packages/table-core/src/core.tsx", | ||
"moduleParts": { | ||
"index.production.js": "ff18-88" | ||
"index.production.js": "722d-88" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
}, | ||
{ | ||
"uid": "ff18-57" | ||
"uid": "722d-57" | ||
}, | ||
{ | ||
"uid": "ff18-59" | ||
"uid": "722d-59" | ||
}, | ||
{ | ||
"uid": "ff18-65" | ||
"uid": "722d-65" | ||
}, | ||
{ | ||
"uid": "ff18-67" | ||
"uid": "722d-67" | ||
}, | ||
{ | ||
"uid": "ff18-71" | ||
"uid": "722d-71" | ||
}, | ||
{ | ||
"uid": "ff18-75" | ||
"uid": "722d-75" | ||
}, | ||
{ | ||
"uid": "ff18-79" | ||
"uid": "722d-79" | ||
}, | ||
{ | ||
"uid": "ff18-63" | ||
"uid": "722d-63" | ||
}, | ||
{ | ||
"uid": "ff18-81" | ||
"uid": "722d-81" | ||
}, | ||
{ | ||
"uid": "ff18-69" | ||
"uid": "722d-69" | ||
}, | ||
{ | ||
"uid": "ff18-83" | ||
"uid": "722d-83" | ||
}, | ||
{ | ||
"uid": "ff18-85" | ||
"uid": "722d-85" | ||
} | ||
@@ -767,14 +767,14 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
} | ||
] | ||
}, | ||
"ff18-89": { | ||
"722d-89": { | ||
"id": "/packages/table-core/src/createTable.tsx", | ||
"moduleParts": { | ||
"index.production.js": "ff18-90" | ||
"index.production.js": "722d-90" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-53" | ||
"uid": "722d-53" | ||
} | ||
@@ -784,10 +784,10 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
} | ||
] | ||
}, | ||
"ff18-91": { | ||
"722d-91": { | ||
"id": "/packages/table-core/src/utils/columnFilterRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-92" | ||
"index.production.js": "722d-92" | ||
}, | ||
@@ -797,10 +797,10 @@ "imported": [], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
} | ||
] | ||
}, | ||
"ff18-93": { | ||
"722d-93": { | ||
"id": "/packages/table-core/src/utils/globalFilterRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-94" | ||
"index.production.js": "722d-94" | ||
}, | ||
@@ -810,10 +810,10 @@ "imported": [], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
} | ||
] | ||
}, | ||
"ff18-95": { | ||
"722d-95": { | ||
"id": "/packages/table-core/src/utils/sortRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-96" | ||
"index.production.js": "722d-96" | ||
}, | ||
@@ -823,14 +823,14 @@ "imported": [], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
} | ||
] | ||
}, | ||
"ff18-97": { | ||
"722d-97": { | ||
"id": "/packages/table-core/src/utils/groupRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-98" | ||
"index.production.js": "722d-98" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -840,10 +840,10 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
} | ||
] | ||
}, | ||
"ff18-99": { | ||
"722d-99": { | ||
"id": "/packages/table-core/src/utils/expandRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-100" | ||
"index.production.js": "722d-100" | ||
}, | ||
@@ -853,17 +853,17 @@ "imported": [], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
}, | ||
{ | ||
"uid": "ff18-101" | ||
"uid": "722d-101" | ||
} | ||
] | ||
}, | ||
"ff18-101": { | ||
"722d-101": { | ||
"id": "/packages/table-core/src/utils/paginateRowsFn.ts", | ||
"moduleParts": { | ||
"index.production.js": "ff18-102" | ||
"index.production.js": "722d-102" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-99" | ||
"uid": "722d-99" | ||
} | ||
@@ -873,74 +873,74 @@ ], | ||
{ | ||
"uid": "ff18-103" | ||
"uid": "722d-103" | ||
} | ||
] | ||
}, | ||
"ff18-103": { | ||
"722d-103": { | ||
"id": "/packages/table-core/src/index.tsx", | ||
"moduleParts": { | ||
"index.production.js": "ff18-104" | ||
"index.production.js": "722d-104" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "ff18-87" | ||
"uid": "722d-87" | ||
}, | ||
{ | ||
"uid": "ff18-57" | ||
"uid": "722d-57" | ||
}, | ||
{ | ||
"uid": "ff18-89" | ||
"uid": "722d-89" | ||
}, | ||
{ | ||
"uid": "ff18-69" | ||
"uid": "722d-69" | ||
}, | ||
{ | ||
"uid": "ff18-81" | ||
"uid": "722d-81" | ||
}, | ||
{ | ||
"uid": "ff18-75" | ||
"uid": "722d-75" | ||
}, | ||
{ | ||
"uid": "ff18-63" | ||
"uid": "722d-63" | ||
}, | ||
{ | ||
"uid": "ff18-71" | ||
"uid": "722d-71" | ||
}, | ||
{ | ||
"uid": "ff18-65" | ||
"uid": "722d-65" | ||
}, | ||
{ | ||
"uid": "ff18-83" | ||
"uid": "722d-83" | ||
}, | ||
{ | ||
"uid": "ff18-67" | ||
"uid": "722d-67" | ||
}, | ||
{ | ||
"uid": "ff18-85" | ||
"uid": "722d-85" | ||
}, | ||
{ | ||
"uid": "ff18-79" | ||
"uid": "722d-79" | ||
}, | ||
{ | ||
"uid": "ff18-59" | ||
"uid": "722d-59" | ||
}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
}, | ||
{ | ||
"uid": "ff18-91" | ||
"uid": "722d-91" | ||
}, | ||
{ | ||
"uid": "ff18-93" | ||
"uid": "722d-93" | ||
}, | ||
{ | ||
"uid": "ff18-95" | ||
"uid": "722d-95" | ||
}, | ||
{ | ||
"uid": "ff18-97" | ||
"uid": "722d-97" | ||
}, | ||
{ | ||
"uid": "ff18-99" | ||
"uid": "722d-99" | ||
}, | ||
{ | ||
"uid": "ff18-101" | ||
"uid": "722d-101" | ||
} | ||
@@ -951,3 +951,3 @@ ], | ||
}, | ||
"ff18-105": { | ||
"722d-105": { | ||
"id": "react", | ||
@@ -958,3 +958,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "ff18-55" | ||
"uid": "722d-55" | ||
} | ||
@@ -961,0 +961,0 @@ ], |
@@ -39,2 +39,3 @@ import { MouseEvent, TouchEvent } from 'react'; | ||
getIsSorted: () => false | SortDirection; | ||
resetSorting: () => void; | ||
toggleSorting: (desc?: boolean, isMulti?: boolean) => void; | ||
@@ -67,3 +68,3 @@ getToggleSortingProps: <TGetter extends Getter<ToggleSortingProps>>(userProps?: TGetter) => undefined | PropGetterValue<ToggleSortingProps, TGetter>; | ||
toggleColumnSorting: (columnId: string, desc?: boolean, multi?: boolean) => void; | ||
resetSorting: () => void; | ||
resetSorting: (columnId?: string) => void; | ||
getColumnCanSort: (columnId: string) => boolean; | ||
@@ -70,0 +71,0 @@ getColumnCanMultiSort: (columnId: string) => boolean; |
{ | ||
"name": "@tanstack/table-core", | ||
"author": "Tanner Linsley", | ||
"version": "8.0.0-alpha.11", | ||
"version": "8.0.0-alpha.12", | ||
"description": "Hooks for building lightweight, fast and extendable datagrids for React", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -70,2 +70,3 @@ import { MouseEvent, TouchEvent } from 'react' | ||
getIsSorted: () => false | SortDirection | ||
resetSorting: () => void | ||
toggleSorting: (desc?: boolean, isMulti?: boolean) => void | ||
@@ -112,3 +113,3 @@ getToggleSortingProps: <TGetter extends Getter<ToggleSortingProps>>( | ||
) => void | ||
resetSorting: () => void | ||
resetSorting: (columnId?: string) => void | ||
getColumnCanSort: (columnId: string) => boolean | ||
@@ -165,2 +166,3 @@ getColumnCanMultiSort: (columnId: string) => boolean | ||
getIsSorted: () => instance.getColumnIsSorted(column.id), | ||
resetSorting: () => instance.resetSorting(column.id), | ||
toggleSorting: (desc, isMulti) => | ||
@@ -408,4 +410,10 @@ instance.toggleColumnSorting(column.id, desc, isMulti), | ||
resetSorting: () => { | ||
instance.setSorting(instance.initialState?.sorting ?? []) | ||
resetSorting: (columnId?: string) => { | ||
if (columnId) { | ||
instance.setSorting(old => | ||
old?.length ? old.filter(d => d.id !== columnId) : [] | ||
) | ||
} else { | ||
instance.setSorting(instance.initialState?.sorting ?? []) | ||
} | ||
}, | ||
@@ -412,0 +420,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2256063
20776