@tanstack/table-core 8.0.0-alpha.41 → 8.0.0-alpha.44
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/build/cjs/core.js +4 -2
- package/build/cjs/core.js.map +1 -1
- package/build/cjs/features/Filters.js.map +1 -1
- package/build/cjs/features/RowSelection.js.map +1 -1
- package/build/cjs/utils/getColumnFilteredRowModelSync.js +2 -2
- package/build/cjs/utils/getColumnFilteredRowModelSync.js.map +1 -1
- package/build/cjs/utils/getExpandedRowModel.js +1 -1
- package/build/cjs/utils/getExpandedRowModel.js.map +1 -1
- package/build/cjs/utils/getGlobalFilteredRowModelSync.js +1 -1
- package/build/cjs/utils/getGlobalFilteredRowModelSync.js.map +1 -1
- package/build/cjs/utils/getGroupedRowModel.js +1 -1
- package/build/cjs/utils/getGroupedRowModel.js.map +1 -1
- package/build/cjs/utils/getPaginationRowModel.js +1 -1
- package/build/cjs/utils/getPaginationRowModel.js.map +1 -1
- package/build/cjs/utils/getSortedRowModelSync.js +1 -1
- package/build/cjs/utils/getSortedRowModelSync.js.map +1 -1
- package/build/esm/index.js +11 -9
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +301 -301
- package/build/types/features/Filters.d.ts +0 -1
- package/build/umd/index.development.js +11 -9
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/core.ts +2 -1
- package/src/features/Filters.ts +0 -1
- package/src/features/RowSelection.ts +1 -1
- package/src/utils/getColumnFilteredRowModelAsync.ts +4 -1
- package/src/utils/getColumnFilteredRowModelSync.ts +5 -2
- package/src/utils/getExpandedRowModel.ts +1 -1
- package/src/utils/getGlobalFilteredRowModelAsync.ts +4 -1
- package/src/utils/getGlobalFilteredRowModelSync.ts +4 -1
- package/src/utils/getGroupedRowModel.ts +1 -1
- package/src/utils/getPaginationRowModel.ts +4 -1
- package/src/utils/getSortedRowModelAsync.ts +1 -1
- package/src/utils/getSortedRowModelSync.ts +1 -1
|
@@ -55,7 +55,6 @@ export declare type FiltersOptions<TGenerics extends AnyGenerics> = {
|
|
|
55
55
|
getColumnFilteredRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
56
56
|
globalFilterType?: FilterType<TGenerics>;
|
|
57
57
|
onGlobalFilterChange?: OnChangeFn<any>;
|
|
58
|
-
enableGlobalFilters?: boolean;
|
|
59
58
|
autoResetGlobalFilter?: boolean;
|
|
60
59
|
enableGlobalFilter?: boolean;
|
|
61
60
|
getGlobalFilteredRowModel?: (instance: TableInstance<TGenerics>) => () => RowModel<TGenerics>;
|
|
@@ -3823,8 +3823,10 @@
|
|
|
3823
3823
|
|
|
3824
3824
|
return template;
|
|
3825
3825
|
},
|
|
3826
|
-
getRowId: function getRowId(
|
|
3827
|
-
|
|
3826
|
+
getRowId: function getRowId(row, index, parent) {
|
|
3827
|
+
var _instance$options$get;
|
|
3828
|
+
|
|
3829
|
+
return (_instance$options$get = instance.options.getRowId == null ? void 0 : instance.options.getRowId(row, index, parent)) != null ? _instance$options$get : "" + (parent ? [parent.id, index].join('.') : index);
|
|
3828
3830
|
},
|
|
3829
3831
|
getState: function getState() {
|
|
3830
3832
|
return instance.options.state;
|
|
@@ -4567,10 +4569,10 @@
|
|
|
4567
4569
|
function getColumnFilteredRowModelSync() {
|
|
4568
4570
|
return function (instance) {
|
|
4569
4571
|
return memo(function () {
|
|
4570
|
-
return [instance.getState().columnFilters, instance.
|
|
4572
|
+
return [instance.getState().columnFilters, instance.getPreColumnFilteredRowModel()];
|
|
4571
4573
|
}, function (columnFilters, rowModel) {
|
|
4572
4574
|
var columnFilteredRowModel = function () {
|
|
4573
|
-
if (!rowModel.rows.length || !columnFilters) {
|
|
4575
|
+
if (!rowModel.rows.length || !(columnFilters != null && columnFilters.length)) {
|
|
4574
4576
|
return rowModel;
|
|
4575
4577
|
}
|
|
4576
4578
|
|
|
@@ -4663,7 +4665,7 @@
|
|
|
4663
4665
|
function getGlobalFilteredRowModelSync() {
|
|
4664
4666
|
return function (instance) {
|
|
4665
4667
|
return memo(function () {
|
|
4666
|
-
return [instance.getState().globalFilter, instance.
|
|
4668
|
+
return [instance.getState().globalFilter, instance.getPreGlobalFilteredRowModel()];
|
|
4667
4669
|
}, function (globalFilter, rowModel) {
|
|
4668
4670
|
var globalFilteredRowModel = function () {
|
|
4669
4671
|
if (!rowModel.rows.length || !globalFilter) {
|
|
@@ -4735,7 +4737,7 @@
|
|
|
4735
4737
|
function getSortedRowModelSync() {
|
|
4736
4738
|
return function (instance) {
|
|
4737
4739
|
return memo(function () {
|
|
4738
|
-
return [instance.getState().sorting, instance.
|
|
4740
|
+
return [instance.getState().sorting, instance.getPreSortedRowModel()];
|
|
4739
4741
|
}, function (sorting, rowModel) {
|
|
4740
4742
|
if (!rowModel.rows.length || !(sorting != null && sorting.length)) {
|
|
4741
4743
|
return rowModel;
|
|
@@ -4835,7 +4837,7 @@
|
|
|
4835
4837
|
function getGroupedRowModelSync() {
|
|
4836
4838
|
return function (instance) {
|
|
4837
4839
|
return memo(function () {
|
|
4838
|
-
return [instance.getState().grouping, instance.
|
|
4840
|
+
return [instance.getState().grouping, instance.getPreGroupedRowModel()];
|
|
4839
4841
|
}, function (grouping, rowModel) {
|
|
4840
4842
|
if (!rowModel.rows.length || !grouping.length) {
|
|
4841
4843
|
return rowModel;
|
|
@@ -4993,7 +4995,7 @@
|
|
|
4993
4995
|
function getExpandedRowModel() {
|
|
4994
4996
|
return function (instance) {
|
|
4995
4997
|
return memo(function () {
|
|
4996
|
-
return [instance.getState().expanded, instance.
|
|
4998
|
+
return [instance.getState().expanded, instance.getPreExpandedRowModel(), instance.options.paginateExpandedRows];
|
|
4997
4999
|
}, function (expanded, rowModel, paginateExpandedRows) {
|
|
4998
5000
|
if (!rowModel.rows.length || // Do not expand if rows are not included in pagination
|
|
4999
5001
|
!paginateExpandedRows || expanded !== true && !Object.keys(expanded != null ? expanded : {}).length) {
|
|
@@ -5035,7 +5037,7 @@
|
|
|
5035
5037
|
function getPaginationRowModel(opts) {
|
|
5036
5038
|
return function (instance) {
|
|
5037
5039
|
return memo(function () {
|
|
5038
|
-
return [instance.getState().pagination, instance.
|
|
5040
|
+
return [instance.getState().pagination, instance.getPrePaginationRowModel()];
|
|
5039
5041
|
}, function (pagination, rowModel) {
|
|
5040
5042
|
if (!rowModel.rows.length) {
|
|
5041
5043
|
return rowModel;
|