diff --git a/examples/react/custom-features/src/main.tsx b/examples/react/custom-features/src/main.tsx index 674390efa7..b699313a12 100644 --- a/examples/react/custom-features/src/main.tsx +++ b/examples/react/custom-features/src/main.tsx @@ -186,7 +186,6 @@ function App() { const table = useTable({ _features: { DensityFeature }, //pass our custom feature to the table to be instantiated upon creation _rowModels: { - Core: createCoreRowModel(), Filtered: createFilteredRowModel(), Paginated: createPaginatedRowModel(), Sorted: createSortedRowModel(), diff --git a/examples/react/expanding/src/main.tsx b/examples/react/expanding/src/main.tsx index 51e4c2d6cd..b6b11678d7 100644 --- a/examples/react/expanding/src/main.tsx +++ b/examples/react/expanding/src/main.tsx @@ -131,7 +131,6 @@ function App() { const table = useTable({ _features, _rowModels: { - Core: createCoreRowModel(), Filtered: createFilteredRowModel(), Paginated: createPaginatedRowModel(), Sorted: createSortedRowModel(), diff --git a/examples/react/filters-faceted/src/main.tsx b/examples/react/filters-faceted/src/main.tsx index 0f354144bb..2d4cf23e58 100644 --- a/examples/react/filters-faceted/src/main.tsx +++ b/examples/react/filters-faceted/src/main.tsx @@ -15,11 +15,15 @@ import { createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, + filterFns, flexRender, + sortingFns, tableFeatures, + tableFns, useTable, } from '@tanstack/react-table' import { makeData } from './makeData' +import type { Fns } from '../../../../packages/table-core/dist/esm/types/Fns' import type { CellData, Column, @@ -38,8 +42,13 @@ const _features = tableFeatures({ RowSorting, }) +const _fns = tableFns(_features, { + filterFns, + sortingFns, +}) + declare module '@tanstack/react-table' { - //allows us to define custom properties for our columns + // allows us to define custom properties for our columns interface ColumnMeta< TFeatures extends TableFeatures, TFns extends Fns, @@ -55,7 +64,9 @@ function App() { [], ) - const columns = React.useMemo>>( + const columns = React.useMemo< + Array> + >( () => [ { accessorKey: 'firstName', @@ -100,19 +111,19 @@ function App() { ) const [data, setData] = React.useState>(() => makeData(5_000)) - const refreshData = () => setData((_old) => makeData(100_000)) //stress test + const refreshData = () => setData((_old) => makeData(100_000)) // stress test const rerender = React.useReducer(() => ({}), {})[1] const table = useTable({ _features, + _fns, _rowModels: { - Core: createCoreRowModel(), - Filtered: createFilteredRowModel(), //client-side filtering + Filtered: createFilteredRowModel(), // client-side filtering Paginated: createPaginatedRowModel(), Sorted: createSortedRowModel(), - Faceted: createFacetedRowModel(), //client-side faceting - FacetedMinMax: createFacetedMinMaxValues(), //generate min/max values for range filter - FacetedUnique: createFacetedUniqueValues(), //generate unique values for select filter/autocomplete + Faceted: createFacetedRowModel(), // client-side faceting + FacetedMinMax: createFacetedMinMaxValues(), // generate min/max values for range filter + FacetedUnique: createFacetedUniqueValues(), // generate unique values for select filter/autocomplete }, columns, data, @@ -319,7 +330,7 @@ function Filter({ column }: { column: Column }) { > {sortedUniqueValues.map((value) => ( - //dynamically generated select options from faceted values feature + // dynamically generated select options from faceted values feature diff --git a/examples/react/filters-fuzzy/src/main.tsx b/examples/react/filters-fuzzy/src/main.tsx index 239ba9567e..7ad5a145be 100644 --- a/examples/react/filters-fuzzy/src/main.tsx +++ b/examples/react/filters-fuzzy/src/main.tsx @@ -127,7 +127,6 @@ function App() { const table = useTable({ _features, _rowModels: { - Core: createCoreRowModel(), Filtered: createFilteredRowModel(), Paginated: createPaginatedRowModel(), Sorted: createSortedRowModel(), diff --git a/examples/react/filters/src/main.tsx b/examples/react/filters/src/main.tsx index 0e9063656c..9ba896c55f 100644 --- a/examples/react/filters/src/main.tsx +++ b/examples/react/filters/src/main.tsx @@ -272,7 +272,11 @@ function App() { ) } -function Filter({ column }: { column: Column }) { +function Filter({ + column, +}: { + column: Column +}) { const columnFilterValue = column.getFilterValue() const { filterVariant } = column.columnDef.meta ?? {} diff --git a/examples/react/full-width-resizable-table/src/main.tsx b/examples/react/full-width-resizable-table/src/main.tsx index caa826d60e..e26f55db03 100644 --- a/examples/react/full-width-resizable-table/src/main.tsx +++ b/examples/react/full-width-resizable-table/src/main.tsx @@ -63,9 +63,7 @@ function App() { const data = React.useMemo(() => makeData(20), []) const table = useTable({ - _rowModels: { - Core: createCoreRowModel(), - }, + _rowModels: {}, columns, data, enableColumnResizing: true, diff --git a/examples/react/full-width-table/src/main.tsx b/examples/react/full-width-table/src/main.tsx index 460d8d4763..d8dbfef0bc 100644 --- a/examples/react/full-width-table/src/main.tsx +++ b/examples/react/full-width-table/src/main.tsx @@ -75,7 +75,6 @@ function App() { const table = useTable({ _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, columns, diff --git a/examples/react/fully-controlled/src/main.tsx b/examples/react/fully-controlled/src/main.tsx index 5c98e58a82..efa8d27c8c 100644 --- a/examples/react/fully-controlled/src/main.tsx +++ b/examples/react/fully-controlled/src/main.tsx @@ -84,7 +84,6 @@ function App() { // Create the table and pass your options const table = useTable({ _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, columns, diff --git a/examples/react/grouping/src/main.tsx b/examples/react/grouping/src/main.tsx index 8945f43116..6574da6dc9 100644 --- a/examples/react/grouping/src/main.tsx +++ b/examples/react/grouping/src/main.tsx @@ -32,7 +32,6 @@ const tableHelper = createTableHelper({ RowExpanding, }, _rowModels: { - Core: createCoreRowModel(), Filtered: createFilteredRowModel(), Paginated: createPaginatedRowModel(), Sorted: createSortedRowModel(), diff --git a/examples/react/kitchen-sink/src/App.tsx b/examples/react/kitchen-sink/src/App.tsx index e6f170111e..526302783b 100644 --- a/examples/react/kitchen-sink/src/App.tsx +++ b/examples/react/kitchen-sink/src/App.tsx @@ -88,7 +88,6 @@ export const App = () => { const table = useTable({ _rowModels: { - Core: createCoreRowModel(), Filtered: createFilteredRowModel(), Paginated: createPaginatedRowModel(), Sorted: createSortedRowModel(), diff --git a/examples/react/material-ui-pagination/src/main.tsx b/examples/react/material-ui-pagination/src/main.tsx index f6b55f786c..ecb5d5c56d 100644 --- a/examples/react/material-ui-pagination/src/main.tsx +++ b/examples/react/material-ui-pagination/src/main.tsx @@ -114,7 +114,6 @@ function LocalTable({ }) { const table = useTable({ _rowModels: { - Core: createCoreRowModel(), Filtered: createFilteredRowModel(), Paginated: createPaginatedRowModel(), }, diff --git a/examples/react/pagination-controlled/src/main.tsx b/examples/react/pagination-controlled/src/main.tsx index 86287512d6..97b88693e9 100644 --- a/examples/react/pagination-controlled/src/main.tsx +++ b/examples/react/pagination-controlled/src/main.tsx @@ -93,9 +93,7 @@ function App() { const table = useTable({ _features: {}, - _rowModels: { - Core: createCoreRowModel(), - }, + _rowModels: {}, columns, data: dataQuery.data?.rows ?? defaultData, rowCount: dataQuery.data?.rowCount, //alternatively, just pass in `pageCount` directly diff --git a/examples/react/pagination/src/main.tsx b/examples/react/pagination/src/main.tsx index 24735c0666..4d75d34c3c 100644 --- a/examples/react/pagination/src/main.tsx +++ b/examples/react/pagination/src/main.tsx @@ -98,7 +98,6 @@ function MyTable({ const table = useTable({ _rowModels: { - Core: createCoreRowModel(), Sorted: createSortedRowModel(), Filtered: createFilteredRowModel(), Paginated: createPaginatedRowModel(), diff --git a/examples/react/query-router-search-params/src/components/table.tsx b/examples/react/query-router-search-params/src/components/table.tsx index f8330bbbce..5a5c57bd74 100644 --- a/examples/react/query-router-search-params/src/components/table.tsx +++ b/examples/react/query-router-search-params/src/components/table.tsx @@ -37,7 +37,7 @@ export default function Table>({ sorting, }: Props) { const table = useTable({ - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, columns, data, manualFiltering: true, diff --git a/examples/react/row-dnd/src/main.tsx b/examples/react/row-dnd/src/main.tsx index 535da9f99e..309c797110 100644 --- a/examples/react/row-dnd/src/main.tsx +++ b/examples/react/row-dnd/src/main.tsx @@ -120,9 +120,7 @@ function App() { const table = useTable({ _features: {}, - _rowModels: { - Core: createCoreRowModel(), - }, + _rowModels: {}, columns, data, getRowId: (row) => row.userId, //required because row indexes will change diff --git a/examples/react/row-pinning/src/main.tsx b/examples/react/row-pinning/src/main.tsx index 610618fe1d..4ef558f213 100644 --- a/examples/react/row-pinning/src/main.tsx +++ b/examples/react/row-pinning/src/main.tsx @@ -157,7 +157,6 @@ function App() { const table = useTable({ _features, _rowModels: { - Core: createCoreRowModel(), Filtered: createFilteredRowModel(), Expanded: createExpandedRowModel(), Paginated: createPaginatedRowModel(), diff --git a/examples/react/row-selection/src/main.tsx b/examples/react/row-selection/src/main.tsx index 6669213d1c..db205db75a 100644 --- a/examples/react/row-selection/src/main.tsx +++ b/examples/react/row-selection/src/main.tsx @@ -113,7 +113,6 @@ function App() { const table = useTable({ _features, _rowModels: { - Core: createCoreRowModel(), Filtered: createFilteredRowModel(), Paginated: createPaginatedRowModel(), }, diff --git a/examples/react/sorting/src/main.tsx b/examples/react/sorting/src/main.tsx index 2a7e4d9cf6..2d1e03ac48 100644 --- a/examples/react/sorting/src/main.tsx +++ b/examples/react/sorting/src/main.tsx @@ -82,7 +82,6 @@ function App() { const table = useTable({ _features: { RowSorting }, _rowModels: { - Core: createCoreRowModel(), Sorted: createSortedRowModel(), //client-side sorting }, columns, diff --git a/examples/react/sub-components/src/main.tsx b/examples/react/sub-components/src/main.tsx index 25aa60c53e..3f33865bbf 100644 --- a/examples/react/sub-components/src/main.tsx +++ b/examples/react/sub-components/src/main.tsx @@ -115,7 +115,6 @@ function Table({ const table = useTable({ _features: { RowExpanding }, _rowModels: { - Core: createCoreRowModel(), Expanded: createExpandedRowModel(), }, columns, diff --git a/examples/react/virtualized-columns/src/main.tsx b/examples/react/virtualized-columns/src/main.tsx index bc51a6999e..02a682fb06 100644 --- a/examples/react/virtualized-columns/src/main.tsx +++ b/examples/react/virtualized-columns/src/main.tsx @@ -28,7 +28,7 @@ function App() { const table = useTable({ _features: { ColumnSizing, RowSorting }, - _rowModels: { Core: createCoreRowModel(), Sorted: createSortedRowModel() }, + _rowModels: { Sorted: createSortedRowModel() }, columns, data, debugTable: true, diff --git a/examples/react/virtualized-infinite-scrolling/src/main.tsx b/examples/react/virtualized-infinite-scrolling/src/main.tsx index e7ff1106f3..80e0c3995d 100644 --- a/examples/react/virtualized-infinite-scrolling/src/main.tsx +++ b/examples/react/virtualized-infinite-scrolling/src/main.tsx @@ -129,7 +129,7 @@ function App() { const table = useTable({ _features: { ColumnSizing, RowSorting }, - _rowModels: { Core: createCoreRowModel(), Sorted: createSortedRowModel() }, + _rowModels: { Sorted: createSortedRowModel() }, data: flatData, columns, state: { diff --git a/examples/react/virtualized-rows/src/main.tsx b/examples/react/virtualized-rows/src/main.tsx index bbf4214a28..4ae9509f5a 100644 --- a/examples/react/virtualized-rows/src/main.tsx +++ b/examples/react/virtualized-rows/src/main.tsx @@ -71,7 +71,7 @@ function App() { const table = useTable({ _features: { ColumnSizing, RowSorting }, - _rowModels: { Core: createCoreRowModel(), Sorted: createSortedRowModel() }, + _rowModels: { Sorted: createSortedRowModel() }, columns, data, debugTable: true, diff --git a/packages/table-core/src/features/column-filtering/ColumnFiltering.types.ts b/packages/table-core/src/features/column-filtering/ColumnFiltering.types.ts index 3094e02000..7e28b3ae6f 100644 --- a/packages/table-core/src/features/column-filtering/ColumnFiltering.types.ts +++ b/packages/table-core/src/features/column-filtering/ColumnFiltering.types.ts @@ -48,7 +48,7 @@ export interface TableFns_ColumnFiltering< TFns extends Fns, TData extends RowData, > { - filterFns?: Record> + filterFns: Record> } export interface FilterFn< diff --git a/packages/table-core/src/features/column-filtering/ColumnFiltering.utils.ts b/packages/table-core/src/features/column-filtering/ColumnFiltering.utils.ts index 2d7a51589f..5b0abcc664 100644 --- a/packages/table-core/src/features/column-filtering/ColumnFiltering.utils.ts +++ b/packages/table-core/src/features/column-filtering/ColumnFiltering.utils.ts @@ -25,7 +25,10 @@ export function column_getAutoFilterFn< column: Column, table: Table_Internal, ) { - const { filterFns } = table._fns + const filterFns = table._fns.filterFns as + | Record> + | undefined + const firstRow = table_getCoreRowModel(table).flatRows[0] const value = firstRow ? row_getValue(firstRow, table, column.id) : undefined @@ -64,11 +67,14 @@ export function column_getFilterFn< }, table: Table_Internal, ): FilterFn | undefined { + const filterFns = table._fns.filterFns as + | Record> + | undefined return isFunction(column.columnDef.filterFn) ? column.columnDef.filterFn : column.columnDef.filterFn === 'auto' ? column_getAutoFilterFn(column, table) - : table._fns.filterFns?.[column.columnDef.filterFn as string] + : filterFns?.[column.columnDef.filterFn as string] } export function column_getCanFilter< @@ -258,7 +264,10 @@ export function shouldAutoRemoveFilter< ) { return ( (filterFn && filterFn.autoRemove - ? filterFn.autoRemove(value, column) + ? filterFn.autoRemove( + value, + column as Column, + ) : false) || typeof value === 'undefined' || (typeof value === 'string' && !value) diff --git a/packages/table-core/src/features/column-grouping/ColumnGrouping.types.ts b/packages/table-core/src/features/column-grouping/ColumnGrouping.types.ts index 32eed12827..92665490c7 100644 --- a/packages/table-core/src/features/column-grouping/ColumnGrouping.types.ts +++ b/packages/table-core/src/features/column-grouping/ColumnGrouping.types.ts @@ -30,7 +30,7 @@ export interface TableFns_ColumnGrouping< TFns extends Fns, TData extends RowData, > { - aggregationFns?: Record< + aggregationFns: Record< keyof AggregationFns, AggregationFn > diff --git a/packages/table-core/src/features/column-grouping/ColumnGrouping.utils.ts b/packages/table-core/src/features/column-grouping/ColumnGrouping.utils.ts index d1b0b2ba70..a724e02815 100644 --- a/packages/table-core/src/features/column-grouping/ColumnGrouping.utils.ts +++ b/packages/table-core/src/features/column-grouping/ColumnGrouping.utils.ts @@ -14,6 +14,7 @@ import type { Row } from '../../types/Row' import type { Cell } from '../../types/Cell' import type { Column } from '../../types/Column' import type { + AggregationFn, ColumnDef_ColumnGrouping, GroupingState, Row_ColumnGrouping, @@ -114,7 +115,10 @@ export function column_getAutoAggregationFn< }, table: Table_Internal, ) { - const { aggregationFns } = table._fns + const aggregationFns = table._fns.aggregationFns as + | Record> + | undefined + const firstRow = table.getCoreRowModel().flatRows[0] const value = firstRow?.getValue(column.id) @@ -139,11 +143,15 @@ export function column_getAggregationFn< }, table: Table_Internal, ) { + const aggregationFns = table._fns.aggregationFns as + | Record> + | undefined + return isFunction(column.columnDef.aggregationFn) ? column.columnDef.aggregationFn : column.columnDef.aggregationFn === 'auto' ? column_getAutoAggregationFn(column, table) - : table._fns.aggregationFns?.[column.columnDef.aggregationFn as string] + : aggregationFns?.[column.columnDef.aggregationFn as string] } export function table_setGrouping< diff --git a/packages/table-core/src/features/row-sorting/RowSorting.types.ts b/packages/table-core/src/features/row-sorting/RowSorting.types.ts index 84f87bca6e..1e8009ab55 100644 --- a/packages/table-core/src/features/row-sorting/RowSorting.types.ts +++ b/packages/table-core/src/features/row-sorting/RowSorting.types.ts @@ -30,7 +30,7 @@ export interface TableFns_RowSorting< TFns extends Fns, TData extends RowData, > { - sortingFns?: Record> + sortingFns: Record> } export interface SortingFns {} diff --git a/packages/table-core/src/features/row-sorting/RowSorting.utils.ts b/packages/table-core/src/features/row-sorting/RowSorting.utils.ts index 64c615d4e4..5668eb3419 100644 --- a/packages/table-core/src/features/row-sorting/RowSorting.utils.ts +++ b/packages/table-core/src/features/row-sorting/RowSorting.utils.ts @@ -8,7 +8,6 @@ import { table_getState, } from '../../core/table/Tables.utils' import type { Fns } from '../../types/Fns' -import type { BuiltInSortingFn } from '../../fns/sortingFns' import type { CellData, RowData, Updater } from '../../types/type-utils' import type { TableFeatures } from '../../types/TableFeatures' import type { RowModel } from '../../types/RowModel' @@ -17,6 +16,7 @@ import type { Column } from '../../types/Column' import type { ColumnDef_RowSorting, SortDirection, + SortingFn, SortingState, } from './RowSorting.types' @@ -73,7 +73,10 @@ export function column_getAutoSortingFn< }, table: Table_Internal, ) { - const { sortingFns } = table._fns + const sortingFns = table._fns.sortingFns as + | Record> + | undefined + const firstRows = table_getFilteredRowModel(table).flatRows.slice(10) let isString = false @@ -144,11 +147,15 @@ export function column_getSortingFn< }, table: Table_Internal, ) { + const sortingFns = table._fns.sortingFns as + | Record> + | undefined + return isFunction(column.columnDef.sortingFn) ? column.columnDef.sortingFn : column.columnDef.sortingFn === 'auto' ? column_getAutoSortingFn(column, table) - : table._fns.sortingFns?.[column.columnDef.sortingFn as string] + : sortingFns?.[column.columnDef.sortingFn as string] } /** diff --git a/packages/table-core/src/types/Fns.ts b/packages/table-core/src/types/Fns.ts index 02708b0d3e..c7b8e3886f 100644 --- a/packages/table-core/src/types/Fns.ts +++ b/packages/table-core/src/types/Fns.ts @@ -8,7 +8,12 @@ export type Fns< TFeatures extends TableFeatures, TFns extends Fns, TData extends RowData, -> = UnionToIntersection< +> = { + /** + * @deprecated + */ + _?: never +} & UnionToIntersection< | ('ColumnFiltering' extends keyof TFeatures ? TableFns_ColumnFiltering : never) diff --git a/packages/table-core/tests/RowPinning.test.ts b/packages/table-core/tests/RowPinning.test.ts index 84d50186c7..85b810e147 100644 --- a/packages/table-core/tests/RowPinning.test.ts +++ b/packages/table-core/tests/RowPinning.test.ts @@ -36,7 +36,6 @@ describe('RowPinning', () => { const table = constructTable({ _features: { RowPinning, RowPagination }, _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, enableRowPinning: true, @@ -70,7 +69,6 @@ describe('RowPinning', () => { const table = constructTable({ _features: { RowPinning, RowPagination }, _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, enableRowPinning: true, @@ -104,7 +102,6 @@ describe('RowPinning', () => { const table = constructTable({ _features: { RowPinning, RowPagination }, _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, enableRowPinning: true, @@ -138,7 +135,6 @@ describe('RowPinning', () => { const table = constructTable({ _features: { RowPinning, RowPagination }, _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, enableRowPinning: true, @@ -171,7 +167,6 @@ describe('RowPinning', () => { const table = constructTable({ _features: { RowPinning, RowPagination }, _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, enableRowPinning: true, @@ -205,7 +200,6 @@ describe('RowPinning', () => { const table = constructTable({ _features: { RowPinning, RowPagination }, _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, enableRowPinning: true, @@ -241,7 +235,6 @@ describe('RowPinning', () => { const table = constructTable({ _features: { RowPinning, RowPagination }, _rowModels: { - Core: createCoreRowModel(), Paginated: createPaginatedRowModel(), }, enableRowPinning: true, diff --git a/packages/table-core/tests/RowSelection.test.ts b/packages/table-core/tests/RowSelection.test.ts index b27bd312eb..713aca554b 100644 --- a/packages/table-core/tests/RowSelection.test.ts +++ b/packages/table-core/tests/RowSelection.test.ts @@ -33,7 +33,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: true, onStateChange() {}, renderFallbackValue: '', @@ -63,7 +63,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: true, onStateChange() {}, renderFallbackValue: '', @@ -93,7 +93,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: true, onStateChange() {}, renderFallbackValue: '', @@ -162,7 +162,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: true, onStateChange() {}, renderFallbackValue: '', @@ -188,7 +188,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: true, onStateChange() {}, renderFallbackValue: '', @@ -217,7 +217,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: true, onStateChange() {}, renderFallbackValue: '', @@ -248,7 +248,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: true, onStateChange() {}, renderFallbackValue: '', @@ -279,7 +279,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: (row) => row.index === 0, // only first row is selectable (of 2 sub-rows) onStateChange() {}, renderFallbackValue: '', @@ -309,7 +309,7 @@ describe('RowSelection', () => { const table = constructTable({ _features: { RowSelection }, - _rowModels: { Core: createCoreRowModel() }, + _rowModels: {}, enableRowSelection: true, onStateChange() {}, renderFallbackValue: '', diff --git a/packages/table-core/tests/getGroupedRowModel.test.ts b/packages/table-core/tests/getGroupedRowModel.test.ts index 244a561607..8142c972d8 100644 --- a/packages/table-core/tests/getGroupedRowModel.test.ts +++ b/packages/table-core/tests/getGroupedRowModel.test.ts @@ -39,7 +39,6 @@ describe('#getGroupedRowModel', () => { const table = constructTable({ _features: { ColumnGrouping }, _rowModels: { - Core: createCoreRowModel(), Grouped: createGroupedRowModel(), }, onStateChange() {},