Skip to content

Commit f6344bb

Browse files
committed
rename feature imports
1 parent 2056b09 commit f6344bb

File tree

156 files changed

+3347
-3570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+3347
-3570
lines changed

docs/guide/custom-features.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,51 +58,51 @@ This might be a bit confusing, so let's break down what each of these methods do
5858

5959
##### getDefaultTableOptions
6060

61-
The `getDefaultTableOptions` method in a table feature is responsible for setting the default table options for that feature. For example, in the [Column Sizing](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/ColumnSizing.ts) feature, the `getDefaultTableOptions` method sets the default `columnResizeMode` option with a default value of `"onEnd"`.
61+
The `getDefaultTableOptions` method in a table feature is responsible for setting the default table options for that feature. For example, in the [Column Sizing](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnSizingFeature.ts) feature, the `getDefaultTableOptions` method sets the default `columnResizeMode` option with a default value of `"onEnd"`.
6262

6363
<br />
6464

6565
##### getDefaultColumnDef
6666

67-
The `getDefaultColumnDef` method in a table feature is responsible for setting the default column options for that feature. For example, in the [Sorting](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/RowSorting.ts) feature, the `getDefaultColumnDef` method sets the default `sortUndefined` column option with a default value of `1`.
67+
The `getDefaultColumnDef` method in a table feature is responsible for setting the default column options for that feature. For example, in the [Sorting](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSortingFeature.ts) feature, the `getDefaultColumnDef` method sets the default `sortUndefined` column option with a default value of `1`.
6868

6969
<br />
7070

7171
##### getInitialState
7272

73-
The `getInitialState` method in a table feature is responsible for setting the default state for that feature. For example, in the [Pagination](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/RowPagination.ts) feature, the `getInitialState` method sets the default `pageSize` state with a value of `10` and the default `pageIndex` state with a value of `0`.
73+
The `getInitialState` method in a table feature is responsible for setting the default state for that feature. For example, in the [Pagination](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowPaginationFeature.ts) feature, the `getInitialState` method sets the default `pageSize` state with a value of `10` and the default `pageIndex` state with a value of `0`.
7474

7575
#### API Creators
7676

7777
<br />
7878

7979
##### constructTable
8080

81-
The `constructTable` method in a table feature is responsible for adding methods to the `table` instance. For example, in the [Row Selection](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/RowSelection.ts) feature, the `constructTable` method adds many table instance API methods such as `toggleAllRowsSelected`, `getIsAllRowsSelected`, `getIsSomeRowsSelected`, etc. So then, when you call `table.toggleAllRowsSelected()`, you are calling a method that was added to the table instance by the `RowSelection` feature.
81+
The `constructTable` method in a table feature is responsible for adding methods to the `table` instance. For example, in the [Row Selection](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSelectionFeature.ts) feature, the `constructTable` method adds many table instance API methods such as `toggleAllRowsSelected`, `getIsAllRowsSelected`, `getIsSomeRowsSelected`, etc. So then, when you call `table.toggleAllRowsSelected()`, you are calling a method that was added to the table instance by the `rowSelectionFeature` feature.
8282

8383
<br />
8484

8585
##### constructHeader
8686

87-
The `constructHeader` method in a table feature is responsible for adding methods to the `header` instance. For example, in the [Column Sizing](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/ColumnSizing.ts) feature, the `constructHeader` method adds many header instance API methods such as `getStart`, and many others. So then, when you call `header.getStart()`, you are calling a method that was added to the header instance by the `ColumnSizing` feature.
87+
The `constructHeader` method in a table feature is responsible for adding methods to the `header` instance. For example, in the [Column Sizing](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnSizingFeature.ts) feature, the `constructHeader` method adds many header instance API methods such as `getStart`, and many others. So then, when you call `header.getStart()`, you are calling a method that was added to the header instance by the `columnSizingFeature` feature.
8888

8989
<br />
9090

9191
##### constructColumn
9292

93-
The `constructColumn` method in a table feature is responsible for adding methods to the `column` instance. For example, in the [Sorting](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/RowSorting.ts) feature, the `constructColumn` method adds many column instance API methods such as `getNextSortingOrder`, `toggleSorting`, etc. So then, when you call `column.toggleSorting()`, you are calling a method that was added to the column instance by the `RowSorting` feature.
93+
The `constructColumn` method in a table feature is responsible for adding methods to the `column` instance. For example, in the [Sorting](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSortingFeature.ts) feature, the `constructColumn` method adds many column instance API methods such as `getNextSortingOrder`, `toggleSorting`, etc. So then, when you call `column.toggleSorting()`, you are calling a method that was added to the column instance by the `rowSortingFeature` feature.
9494

9595
<br />
9696

9797
##### constructRow
9898

99-
The `constructRow` method in a table feature is responsible for adding methods to the `row` instance. For example, in the [Row Selection](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/RowSelection.ts) feature, the `constructRow` method adds many row instance API methods such as `toggleSelected`, `getIsSelected`, etc. So then, when you call `row.toggleSelected()`, you are calling a method that was added to the row instance by the `RowSelection` feature.
99+
The `constructRow` method in a table feature is responsible for adding methods to the `row` instance. For example, in the [Row Selection](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/rowSelectionFeature.ts) feature, the `constructRow` method adds many row instance API methods such as `toggleSelected`, `getIsSelected`, etc. So then, when you call `row.toggleSelected()`, you are calling a method that was added to the row instance by the `rowSelectionFeature` feature.
100100

101101
<br />
102102

103103
##### constructCell
104104

105-
The `constructCell` method in a table feature is responsible for adding methods to the `cell` instance. For example, in the [Column Grouping](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/ColumnGrouping.ts) feature, the `constructCell` method adds many cell instance API methods such as `getIsGrouped`, `getIsAggregated`, etc. So then, when you call `cell.getIsGrouped()`, you are calling a method that was added to the cell instance by the `ColumnGrouping` feature.
105+
The `constructCell` method in a table feature is responsible for adding methods to the `cell` instance. For example, in the [Column Grouping](https://github.com/TanStack/table/blob/main/packages/table-core/src/features/columnGroupingFeature.ts) feature, the `constructCell` method adds many cell instance API methods such as `getIsGrouped`, `getIsAggregated`, etc. So then, when you call `cell.getIsGrouped()`, you are calling a method that was added to the cell instance by the `columnGroupingFeature` feature.
106106

107107
### Adding a Custom Feature
108108

examples/angular/column-ordering/src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import {
1010
injectTable,
1111
} from '@tanstack/angular-table'
1212
import { faker } from '@faker-js/faker'
13-
import { type Person, makeData } from './makeData'
13+
import { makeData } from './makeData'
14+
import type { Person } from './makeData'
1415
import type {
1516
ColumnDef,
1617
ColumnOrderState,

examples/angular/column-pinning-sticky/src/app/app.component.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import { Component, computed, signal } from '@angular/core'
22
import {
3-
type Column,
4-
type ColumnDef,
5-
type ColumnOrderState,
6-
type ColumnPinningState,
7-
type ColumnVisibilityState,
83
FlexRenderDirective,
94
createCoreRowModel,
105
injectTable,
116
} from '@tanstack/angular-table'
127
import { faker } from '@faker-js/faker'
138
import { NgStyle, NgTemplateOutlet, SlicePipe } from '@angular/common'
149
import { makeData } from './makeData'
10+
import type {
11+
Column,
12+
ColumnDef,
13+
ColumnOrderState,
14+
ColumnPinningState,
15+
ColumnVisibilityState,
16+
} from '@tanstack/angular-table'
1517

1618
type Person = {
1719
firstName: string

examples/angular/column-visibility/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
ChangeDetectionStrategy,
33
Component,
4-
type OnInit,
54
computed,
65
signal,
76
} from '@angular/core'
@@ -10,6 +9,7 @@ import {
109
createCoreRowModel,
1110
injectTable,
1211
} from '@tanstack/angular-table'
12+
import type { OnInit } from '@angular/core'
1313
import type { ColumnDef, ColumnVisibilityState } from '@tanstack/angular-table'
1414

1515
type Person = {

examples/angular/filters/src/app/debounced-input.directive.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import { Directive, ElementRef, inject, input } from '@angular/core'
2-
import {
3-
type MonoTypeOperatorFunction,
4-
Observable,
5-
debounceTime,
6-
fromEvent,
7-
switchMap,
8-
} from 'rxjs'
2+
import { Observable, debounceTime, fromEvent, switchMap } from 'rxjs'
93
import { outputFromObservable, toObservable } from '@angular/core/rxjs-interop'
4+
import type { MonoTypeOperatorFunction } from 'rxjs'
105
import type { NgZone } from '@angular/core'
116

127
export function runOutsideAngular<T>(

examples/angular/row-selection-signal/src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ import {
1313
injectTable,
1414
} from '@tanstack/angular-table'
1515
import { FilterComponent } from './filter'
16-
import { type Person, makeData } from './makeData'
16+
import { makeData } from './makeData'
1717
import {
1818
TableHeadSelectionComponent,
1919
TableRowSelectionComponent,
2020
} from './selection-column.component'
21+
import type { Person } from './makeData'
2122
import type { ColumnDef, RowSelectionState } from '@tanstack/angular-table'
2223
import type { TemplateRef } from '@angular/core'
2324

examples/angular/row-selection/src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ import {
1515
} from '@tanstack/angular-table'
1616
import { FormsModule } from '@angular/forms'
1717
import { FilterComponent } from './filter'
18-
import { type Person, makeData } from './makeData'
18+
import { makeData } from './makeData'
1919
import {
2020
TableHeadSelectionComponent,
2121
TableRowSelectionComponent,
2222
} from './selection-column.component'
23+
import type { Person } from './makeData'
2324
import type { ColumnDef, RowSelectionState } from '@tanstack/angular-table'
2425
import type { TemplateRef } from '@angular/core'
2526

examples/angular/row-selection/src/app/selection-column.component.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import {
2-
type CellContext,
3-
type HeaderContext,
4-
injectFlexRenderContext,
5-
} from '@tanstack/angular-table'
1+
import { injectFlexRenderContext } from '@tanstack/angular-table'
62
import { ChangeDetectionStrategy, Component } from '@angular/core'
3+
import type { CellContext, HeaderContext } from '@tanstack/angular-table'
74

85
@Component({
96
template: `

examples/angular/signal-input/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ChangeDetectionStrategy, Component, signal } from '@angular/core'
2-
import { type PaginationState } from '@tanstack/angular-table'
32
import { makeData } from './makeData'
43
import { PersonTableComponent } from './person-table/person-table.component'
4+
import type { PaginationState } from '@tanstack/angular-table'
55

66
@Component({
77
selector: 'app-root',

examples/lit/basic/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { LitElement, html } from 'lit'
33
import { repeat } from 'lit/directives/repeat.js'
44
import {
55
ColumnDef,
6-
RowSorting,
76
TableController,
87
flexRender,
8+
rowSortingFeature,
99
tableFeatures,
1010
} from '@tanstack/lit-table'
1111
import install from '@twind/with-web-components'
@@ -25,7 +25,7 @@ type Person = {
2525

2626
// 3. New in V9! Tell the table which features and row models we want to use. In this case, this will be a basic table with no additional features
2727
const _features = tableFeatures({
28-
RowSorting: RowSorting,
28+
rowSortingFeature: rowSortingFeature,
2929
})
3030

3131
// const columnHelper = createColumnHelper<typeof _features, Person>()

0 commit comments

Comments
 (0)