Skip to content

Commit 8bbebbe

Browse files
committed
fix: rename table.Subscribe atom prop to source
1 parent 6550174 commit 8bbebbe

28 files changed

Lines changed: 332 additions & 305 deletions

File tree

docs/framework/angular/reference/functions/injectTable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: injectTable
99
function injectTable<TFeatures, TData, TSelected>(options, selector): AngularTable<TFeatures, TData, TSelected>;
1010
```
1111

12-
Defined in: [injectTable.ts:124](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L124)
12+
Defined in: [injectTable.ts:125](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L125)
1313

1414
Creates and returns an Angular-reactive table instance.
1515

docs/framework/angular/reference/interfaces/AngularTableComputed.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ title: AngularTableComputed
55

66
# Interface: AngularTableComputed()\<TFeatures\>
77

8-
Defined in: [injectTable.ts:31](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L31)
8+
Defined in: [injectTable.ts:32](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L32)
99

1010
Store mode: pass `selector` (required) to project from full table state.
11-
Atom mode: pass `atom`; omit `selector` for the whole atom (identity), or pass
12-
`selector` to project. Split overloads match React `Subscribe` inference.
11+
Source mode: pass `source` (atom or store); omit `selector` for the whole value
12+
(identity), or pass `selector` to project. Split overloads match React `Subscribe`
13+
inference.
1314

1415
## Type Parameters
1516

@@ -20,58 +21,60 @@ Atom mode: pass `atom`; omit `selector` for the whole atom (identity), or pass
2021
## Call Signature
2122

2223
```ts
23-
AngularTableComputed<TAtomValue>(props): Signal<Readonly<TAtomValue>>;
24+
AngularTableComputed<TSourceValue>(props): Signal<Readonly<TSourceValue>>;
2425
```
2526

26-
Defined in: [injectTable.ts:32](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L32)
27+
Defined in: [injectTable.ts:33](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L33)
2728

2829
Store mode: pass `selector` (required) to project from full table state.
29-
Atom mode: pass `atom`; omit `selector` for the whole atom (identity), or pass
30-
`selector` to project. Split overloads match React `Subscribe` inference.
30+
Source mode: pass `source` (atom or store); omit `selector` for the whole value
31+
(identity), or pass `selector` to project. Split overloads match React `Subscribe`
32+
inference.
3133

3234
### Type Parameters
3335

34-
#### TAtomValue
36+
#### TSourceValue
3537

36-
`TAtomValue`
38+
`TSourceValue`
3739

3840
### Parameters
3941

4042
#### props
4143

42-
##### atom
43-
44-
`Atom`\<`TAtomValue`\> \| `ReadonlyAtom`\<`TAtomValue`\>
45-
4644
##### equal?
4745

48-
`ValueEqualityFn`\<`TAtomValue`\>
46+
`ValueEqualityFn`\<`TSourceValue`\>
4947

5048
##### selector?
5149

5250
`undefined`
5351

52+
##### source
53+
54+
`Atom`\<`TSourceValue`\> \| `ReadonlyAtom`\<`TSourceValue`\>
55+
5456
### Returns
5557

56-
`Signal`\<`Readonly`\<`TAtomValue`\>\>
58+
`Signal`\<`Readonly`\<`TSourceValue`\>\>
5759

5860
## Call Signature
5961

6062
```ts
61-
AngularTableComputed<TAtomValue, TSubSelected>(props): Signal<Readonly<TSubSelected>>;
63+
AngularTableComputed<TSourceValue, TSubSelected>(props): Signal<Readonly<TSubSelected>>;
6264
```
6365

64-
Defined in: [injectTable.ts:37](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L37)
66+
Defined in: [injectTable.ts:38](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L38)
6567

6668
Store mode: pass `selector` (required) to project from full table state.
67-
Atom mode: pass `atom`; omit `selector` for the whole atom (identity), or pass
68-
`selector` to project. Split overloads match React `Subscribe` inference.
69+
Source mode: pass `source` (atom or store); omit `selector` for the whole value
70+
(identity), or pass `selector` to project. Split overloads match React `Subscribe`
71+
inference.
6972

7073
### Type Parameters
7174

72-
#### TAtomValue
75+
#### TSourceValue
7376

74-
`TAtomValue`
77+
`TSourceValue`
7578

7679
#### TSubSelected
7780

@@ -81,10 +84,6 @@ Atom mode: pass `atom`; omit `selector` for the whole atom (identity), or pass
8184

8285
#### props
8386

84-
##### atom
85-
86-
`Atom`\<`TAtomValue`\> \| `ReadonlyAtom`\<`TAtomValue`\>
87-
8887
##### equal?
8988

9089
`ValueEqualityFn`\<`TSubSelected`\>
@@ -93,6 +92,10 @@ Atom mode: pass `atom`; omit `selector` for the whole atom (identity), or pass
9392

9493
(`state`) => `TSubSelected`
9594

95+
##### source
96+
97+
`Atom`\<`TSourceValue`\> \| `ReadonlyAtom`\<`TSourceValue`\>
98+
9699
### Returns
97100

98101
`Signal`\<`Readonly`\<`TSubSelected`\>\>
@@ -103,11 +106,12 @@ Atom mode: pass `atom`; omit `selector` for the whole atom (identity), or pass
103106
AngularTableComputed<TSubSelected>(props): Signal<Readonly<TSubSelected>>;
104107
```
105108

106-
Defined in: [injectTable.ts:42](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L42)
109+
Defined in: [injectTable.ts:43](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L43)
107110

108111
Store mode: pass `selector` (required) to project from full table state.
109-
Atom mode: pass `atom`; omit `selector` for the whole atom (identity), or pass
110-
`selector` to project. Split overloads match React `Subscribe` inference.
112+
Source mode: pass `source` (atom or store); omit `selector` for the whole value
113+
(identity), or pass `selector` to project. Split overloads match React `Subscribe`
114+
inference.
111115

112116
### Type Parameters
113117

docs/framework/angular/reference/type-aliases/AngularTable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: AngularTable
99
type AngularTable<TFeatures, TData, TSelected> = Table<TFeatures, TData> & object;
1010
```
1111

12-
Defined in: [injectTable.ts:48](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L48)
12+
Defined in: [injectTable.ts:49](https://github.com/TanStack/table/blob/main/packages/angular-table/src/injectTable.ts#L49)
1313

1414
## Type Declaration
1515

docs/framework/react/reference/index/functions/Subscribe.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ title: Subscribe
88
## Call Signature
99

1010
```ts
11-
function Subscribe<TFeatures, TData, TAtomValue>(props): ReactNode | Promise<ReactNode>;
11+
function Subscribe<TFeatures, TData, TSourceValue>(props): ReactNode | Promise<ReactNode>;
1212
```
1313

14-
Defined in: [Subscribe.ts:138](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L138)
14+
Defined in: [Subscribe.ts:148](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L148)
1515

1616
A React component that allows you to subscribe to the table state.
1717

@@ -30,15 +30,15 @@ contextual typing works. This standalone component uses a union `props` type.
3030

3131
`TData` *extends* `RowData`
3232

33-
#### TAtomValue
33+
#### TSourceValue
3434

35-
`TAtomValue`
35+
`TSourceValue`
3636

3737
### Parameters
3838

3939
#### props
4040

41-
[`SubscribePropsWithAtomIdentity`](../type-aliases/SubscribePropsWithAtomIdentity.md)\<`TFeatures`, `TData`, `TAtomValue`\>
41+
[`SubscribePropsWithSourceIdentity`](../type-aliases/SubscribePropsWithSourceIdentity.md)\<`TFeatures`, `TData`, `TSourceValue`\>
4242

4343
### Returns
4444

@@ -56,17 +56,17 @@ contextual typing works. This standalone component uses a union `props` type.
5656
```
5757

5858
```tsx
59-
// Entire slice atom (no selector)
60-
<Subscribe table={table} atom={table.atoms.rowSelection}>
59+
// Entire source (atom or store) — no selector
60+
<Subscribe table={table} source={table.atoms.rowSelection}>
6161
{(rowSelection) => <div>...</div>}
6262
</Subscribe>
6363
```
6464

6565
```tsx
66-
// Project atom value (e.g. one row’s selection)
66+
// Project source value (e.g. one row’s selection)
6767
<Subscribe
6868
table={table}
69-
atom={table.atoms.rowSelection}
69+
source={table.atoms.rowSelection}
7070
selector={(rowSelection) => rowSelection?.[row.id]}
7171
>
7272
{(selected) => <tr data-selected={!!selected}>...</tr>}
@@ -85,10 +85,10 @@ contextual typing works. This standalone component uses a union `props` type.
8585
## Call Signature
8686

8787
```ts
88-
function Subscribe<TFeatures, TData, TAtomValue, TSelected>(props): ReactNode | Promise<ReactNode>;
88+
function Subscribe<TFeatures, TData, TSourceValue, TSelected>(props): ReactNode | Promise<ReactNode>;
8989
```
9090

91-
Defined in: [Subscribe.ts:145](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L145)
91+
Defined in: [Subscribe.ts:155](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L155)
9292

9393
A React component that allows you to subscribe to the table state.
9494

@@ -107,9 +107,9 @@ contextual typing works. This standalone component uses a union `props` type.
107107

108108
`TData` *extends* `RowData`
109109

110-
#### TAtomValue
110+
#### TSourceValue
111111

112-
`TAtomValue`
112+
`TSourceValue`
113113

114114
#### TSelected
115115

@@ -119,7 +119,7 @@ contextual typing works. This standalone component uses a union `props` type.
119119

120120
#### props
121121

122-
[`SubscribePropsWithAtomWithSelector`](../type-aliases/SubscribePropsWithAtomWithSelector.md)\<`TFeatures`, `TData`, `TAtomValue`, `TSelected`\>
122+
[`SubscribePropsWithSourceWithSelector`](../type-aliases/SubscribePropsWithSourceWithSelector.md)\<`TFeatures`, `TData`, `TSourceValue`, `TSelected`\>
123123

124124
### Returns
125125

@@ -137,17 +137,17 @@ contextual typing works. This standalone component uses a union `props` type.
137137
```
138138

139139
```tsx
140-
// Entire slice atom (no selector)
141-
<Subscribe table={table} atom={table.atoms.rowSelection}>
140+
// Entire source (atom or store) — no selector
141+
<Subscribe table={table} source={table.atoms.rowSelection}>
142142
{(rowSelection) => <div>...</div>}
143143
</Subscribe>
144144
```
145145

146146
```tsx
147-
// Project atom value (e.g. one row’s selection)
147+
// Project source value (e.g. one row’s selection)
148148
<Subscribe
149149
table={table}
150-
atom={table.atoms.rowSelection}
150+
source={table.atoms.rowSelection}
151151
selector={(rowSelection) => rowSelection?.[row.id]}
152152
>
153153
{(selected) => <tr data-selected={!!selected}>...</tr>}
@@ -169,7 +169,7 @@ contextual typing works. This standalone component uses a union `props` type.
169169
function Subscribe<TFeatures, TData, TSelected>(props): ReactNode | Promise<ReactNode>;
170170
```
171171

172-
Defined in: [Subscribe.ts:158](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L158)
172+
Defined in: [Subscribe.ts:168](https://github.com/TanStack/table/blob/main/packages/react-table/src/Subscribe.ts#L168)
173173

174174
A React component that allows you to subscribe to the table state.
175175

@@ -214,17 +214,17 @@ contextual typing works. This standalone component uses a union `props` type.
214214
```
215215

216216
```tsx
217-
// Entire slice atom (no selector)
218-
<Subscribe table={table} atom={table.atoms.rowSelection}>
217+
// Entire source (atom or store) — no selector
218+
<Subscribe table={table} source={table.atoms.rowSelection}>
219219
{(rowSelection) => <div>...</div>}
220220
</Subscribe>
221221
```
222222

223223
```tsx
224-
// Project atom value (e.g. one row’s selection)
224+
// Project source value (e.g. one row’s selection)
225225
<Subscribe
226226
table={table}
227-
atom={table.atoms.rowSelection}
227+
source={table.atoms.rowSelection}
228228
selector={(rowSelection) => rowSelection?.[row.id]}
229229
>
230230
{(selected) => <tr data-selected={!!selected}>...</tr>}

docs/framework/react/reference/index/functions/useTable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: useTable
99
function useTable<TFeatures, TData, TSelected>(tableOptions, selector): ReactTable<TFeatures, TData, TSelected>;
1010
```
1111

12-
Defined in: [useTable.ts:113](https://github.com/TanStack/table/blob/main/packages/react-table/src/useTable.ts#L113)
12+
Defined in: [useTable.ts:114](https://github.com/TanStack/table/blob/main/packages/react-table/src/useTable.ts#L114)
1313

1414
## Type Parameters
1515

docs/framework/react/reference/index/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ title: index
2828
- [ReactTable](type-aliases/ReactTable.md)
2929
- [Renderable](type-aliases/Renderable.md)
3030
- [SubscribeProps](type-aliases/SubscribeProps.md)
31-
- [SubscribePropsWithAtom](type-aliases/SubscribePropsWithAtom.md)
32-
- [SubscribePropsWithAtomIdentity](type-aliases/SubscribePropsWithAtomIdentity.md)
33-
- [SubscribePropsWithAtomWithSelector](type-aliases/SubscribePropsWithAtomWithSelector.md)
31+
- [SubscribePropsWithSource](type-aliases/SubscribePropsWithSource.md)
32+
- [SubscribePropsWithSourceIdentity](type-aliases/SubscribePropsWithSourceIdentity.md)
33+
- [SubscribePropsWithSourceWithSelector](type-aliases/SubscribePropsWithSourceWithSelector.md)
3434
- [SubscribePropsWithStore](type-aliases/SubscribePropsWithStore.md)
3535

3636
## Functions

0 commit comments

Comments
 (0)