Skip to content

Commit 409fd94

Browse files
committed
Merge branch 'alpha' of https://github.com/TanStack/react-table into alpha
2 parents bba3a83 + f06446b commit 409fd94

File tree

32 files changed

+154
-228
lines changed

32 files changed

+154
-228
lines changed

docs/api/column-pinning.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -88,38 +88,6 @@ resetColumnPinning: () => void
8888
8989
Resets the **columnPinning** state for the table back to its initial state.
9090
91-
### `pinColumn`
92-
93-
```tsx
94-
pinColumn: (columnId: string, position: ColumnPinningPosition) => void
95-
```
96-
97-
Pins a column to the `'left'` or `'right'`, or unpins the column to the center if `false` is passed.
98-
99-
### `getColumnCanPin`
100-
101-
```tsx
102-
getColumnCanPin: (columnId: string) => boolean
103-
```
104-
105-
Returns whether or not the column can be pinned.
106-
107-
### `getColumnIsPinned`
108-
109-
```tsx
110-
getColumnIsPinned: (columnId: string) => ColumnPinningPosition
111-
```
112-
113-
Returns the pinned position of the column. (`'left'`, `'right'` or `false`)
114-
115-
### `getColumnPinnedIndex`
116-
117-
```tsx
118-
getColumnPinnedIndex: (columnId: string) => number
119-
```
120-
121-
Returns the numeric pinned index of the column within a pinned column group.
122-
12391
### `getIsSomeColumnsPinned`
12492
12593
```tsx

docs/api/row-selection.md

Lines changed: 17 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -63,46 +63,21 @@ If provided, this function will be called with an `updaterFn` when `state.rowSel
6363
6464
## Table Instance API
6565
66-
### `getToggleRowSelectedHandler`
66+
### `getToggleAllRowsSelectedHandler`
6767
6868
```tsx
69-
type getToggleRowSelectedHandler = (
70-
rowId: string
71-
) => undefined | ((e: unknown) => void)
69+
getToggleAllRowsSelectedHandler: () => (event: unknown) => void
7270
```
7371
74-
Returns the props for the `<input type="checkbox" />` element in a row that will toggle row selection and provides checked/indeterminate state.
72+
Returns a handler that can be used to toggle all rows in the table.
7573
76-
### `getToggleAllRowsSelectedProps`
74+
### `getToggleAllPageRowsSelectedHandler`
7775
7876
```tsx
79-
type ToggleRowSelectedProps = {
80-
onChange?: (e: unknown) => void
81-
checked?: boolean
82-
title?: string
83-
indeterminate?: boolean
84-
}
85-
86-
getToggleAllRowsSelectedProps: <
87-
TGetter extends Getter<ToggleRowSelectedProps>
88-
>(
89-
userProps?: TGetter
90-
) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>
91-
```
92-
93-
Returns the props for the `<input type="checkbox" />` element in a column header that will toggle row selection for all rows in the table and provides checked/indeterminate state.
94-
95-
### `getToggleAllPageRowsSelectedProps`
96-
97-
```tsx
98-
getToggleAllPageRowsSelectedProps: <
99-
TGetter extends Getter<ToggleRowSelectedProps>
100-
>(
101-
userProps?: TGetter
102-
) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>
77+
getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void
10378
```
10479
105-
Returns the props for the `<input type="checkbox" />` element in a column header that will toggle row selection for all rows on the current page and provides checked/indeterminate state.
80+
Returns a handler that can be used to toggle all rows on the current page.
10681
10782
### `setRowSelection`
10883
@@ -120,54 +95,6 @@ resetRowSelection: () => void
12095
12196
Resets the **rowSelection** state for the table back to its initial state.
12297
123-
### `toggleRowSelected`
124-
125-
```tsx
126-
toggleRowSelected: (rowId: string, value?: boolean) => void
127-
```
128-
129-
Selects/deselects a row.
130-
131-
### `getRowCanSelect`
132-
133-
```tsx
134-
getRowCanSelect: (rowId: string) => boolean
135-
```
136-
137-
Returns whether or not a row can be selected.
138-
139-
### `getRowCanSelectSubRows`
140-
141-
```tsx
142-
getRowCanSelectSubRows: (rowId: string) => boolean
143-
```
144-
145-
Returns whether or not a row's sub-rows can be automatically selected when the parent row is selected.
146-
147-
### `getRowCanMultiSelect`
148-
149-
```tsx
150-
getRowCanMultiSelect: (rowId: string) => boolean
151-
```
152-
153-
Returns whether or not a row can be multi-selected. TODO clarify
154-
155-
### `getRowIsSelected`
156-
157-
```tsx
158-
getRowIsSelected: (rowId: string) => boolean
159-
```
160-
161-
Returns whether or not a row is selected.
162-
163-
### `getRowIsSomeSelected`
164-
165-
```tsx
166-
getRowIsSomeSelected: (rowId: string) => boolean
167-
```
168-
169-
Returns whether or not any sub-rows of a row are selected.
170-
17198
### `getIsAllRowsSelected`
17299
173100
```tsx
@@ -200,14 +127,6 @@ getIsSomePageRowsSelected: () => boolean
200127
201128
Returns whether or not any rows on the current page are selected.
202129
203-
### `queueResetRowSelection`
204-
205-
```tsx
206-
queueResetRowSelection: () => void
207-
```
208-
209-
TODO
210-
211130
### `toggleAllRowsSelected`
212131
213132
```tsx
@@ -232,14 +151,6 @@ getPreSelectedRowModel: () => RowModel<TGenerics>
232151
233152
TODO
234153
235-
### `queueResetRowSelection`
236-
237-
```tsx
238-
queueResetRowSelection: () => void
239-
```
240-
241-
TODO
242-
243154
### `getSelectedRowModel`
244155
245156
```tsx
@@ -298,6 +209,14 @@ getCanMultiSelect: () => boolean
298209
299210
Returns whether or not the row can multi-select. TODO clarify
300211
212+
### `getCanSelectSubRows`
213+
214+
```tsx
215+
getCanSelectSubRows: () => boolean
216+
```
217+
218+
Returns whether or not the row can select sub rows automatically when the parent row is selected.
219+
301220
### `toggleSelected`
302221
303222
```tsx
@@ -306,19 +225,10 @@ toggleSelected: (value?: boolean) => void
306225
307226
Selects/deselects the row.
308227
309-
### `getToggleSelectedProps`
228+
### `getToggleSelectedHandler`
310229
311230
```tsx
312-
type ToggleRowSelectedProps = {
313-
onChange?: (e: unknown) => void
314-
checked?: boolean
315-
title?: string
316-
indeterminate?: boolean
317-
}
318-
319-
getToggleSelectedProps: <TGetter extends Getter<ToggleRowSelectedProps>>(
320-
userProps?: TGetter
321-
) => undefined | PropGetterValue<ToggleRowSelectedProps, TGetter>
231+
getToggleSelectedHandler: () => (event: unknown) => void
322232
```
323233
324-
Returns the props for the `<input type="checkbox" />` element in the row that will toggle row selection and provides checked/indeterminate state.
234+
Returns a handler that can be used to toggle the row.

examples/react/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"react": "^17.0.2",
1313
"react-dom": "^17.0.2",
14-
"@tanstack/react-table": "8.0.0-alpha.67"
14+
"@tanstack/react-table": "8.0.0-alpha.69"
1515
},
1616
"devDependencies": {
1717
"@rollup/plugin-replace": "^4.0.0",

examples/react/column-ordering/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"faker": "^5.5.3",
1313
"react": "^17.0.2",
1414
"react-dom": "^17.0.2",
15-
"@tanstack/react-table": "8.0.0-alpha.67"
15+
"@tanstack/react-table": "8.0.0-alpha.69"
1616
},
1717
"devDependencies": {
1818
"@rollup/plugin-replace": "^3.0.1",

examples/react/column-pinning/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@faker-js/faker": "^6.2.0",
13-
"@tanstack/react-table": "8.0.0-alpha.67",
13+
"@tanstack/react-table": "8.0.0-alpha.69",
1414
"faker": "^5.5.3",
1515
"react": "^17.0.2",
1616
"react-dom": "^17.0.2"

examples/react/column-sizing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"react": "^17.0.2",
1313
"react-dom": "^17.0.2",
14-
"@tanstack/react-table": "8.0.0-alpha.67"
14+
"@tanstack/react-table": "8.0.0-alpha.69"
1515
},
1616
"devDependencies": {
1717
"@rollup/plugin-replace": "^3.0.1",

examples/react/column-visibility/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"react": "^17.0.2",
1313
"react-dom": "^17.0.2",
14-
"@tanstack/react-table": "8.0.0-alpha.67"
14+
"@tanstack/react-table": "8.0.0-alpha.69"
1515
},
1616
"devDependencies": {
1717
"@rollup/plugin-replace": "^3.0.1",

examples/react/editable-data/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"faker": "^6.6.6",
1414
"react": "^17.0.2",
1515
"react-dom": "^17.0.2",
16-
"@tanstack/react-table": "8.0.0-alpha.67"
16+
"@tanstack/react-table": "8.0.0-alpha.69"
1717
},
1818
"devDependencies": {
1919
"@rollup/plugin-replace": "^3.0.1",

examples/react/expanding/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"faker": "^6.6.6",
1414
"react": "^17.0.2",
1515
"react-dom": "^17.0.2",
16-
"@tanstack/react-table": "8.0.0-alpha.67"
16+
"@tanstack/react-table": "8.0.0-alpha.69"
1717
},
1818
"devDependencies": {
1919
"@rollup/plugin-replace": "^3.0.1",

examples/react/experimental-filters-async/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"faker": "^6.6.6",
1414
"react": "^17.0.2",
1515
"react-dom": "^17.0.2",
16-
"@tanstack/react-table": "8.0.0-alpha.65"
16+
"@tanstack/react-table": "8.0.0-alpha.69"
1717
},
1818
"devDependencies": {
1919
"@rollup/plugin-replace": "^3.0.1",

0 commit comments

Comments
 (0)