You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { Fragment, useState, useRef, useLayoutEffect } from 'react';
9
9
10
10
import EditIcon from '@patternfly/react-icons/dist/esm/icons/edit-icon';
11
11
import CloneIcon from '@patternfly/react-icons/dist/esm/icons/clone-icon';
@@ -114,11 +114,13 @@ When all of a toolbar's required elements cannot fit in a single line, you can s
114
114
```
115
115
116
116
## Examples with spacers and wrapping
117
+
117
118
You may adjust the space between toolbar items to arrange them into groups. Read our spacers documentation to learn more about using spacers.
118
119
119
120
Items are spaced “16px” apart by default and can be modified by changing their or their parents' `gap`, `columnGap`, and `rowGap` properties. You can set the property values at multiple breakpoints, including "default", "md", "lg", "xl", and "2xl".
120
121
121
122
### Toolbar content wrapping
123
+
122
124
The toolbar content section will wrap by default, but you can set the `rowRap` property to `noWrap` to make it not wrap.
Copy file name to clipboardExpand all lines: packages/react-table/src/components/Table/examples/Table.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ The `Table` component takes an explicit and declarative approach, and its implem
41
41
42
42
The documentation for the deprecated table implementation can be found under the [React deprecated](/components/table/react-deprecated) tab. It is configuration based and takes a less declarative and more implicit approach to laying out the table structure, such as the rows and cells within it.
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
46
46
import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
47
47
import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
@@ -327,7 +327,6 @@ To enable a tree table:
327
327
-`checkAriaLabel` - (optional) accessible label for the checkbox
328
328
-`showDetailsAriaLabel` - (optional) accessible label for the show row details button in the responsive view
329
329
4. The first `Td` in each row will pass the following to the `treeRow` prop:
330
-
331
330
-`onCollapse` - Callback when user expands/collapses a row to reveal/hide the row's children.
332
331
-`onCheckChange` - (optional) Callback when user changes the checkbox on a row.
333
332
-`onToggleRowDetails` - (optional) Callback when user shows/hides the row details in responsive view.
@@ -427,6 +426,14 @@ To maintain proper sticky behavior across sticky columns and header, `Table` mus
427
426
428
427
```
429
428
429
+
### Sticky columns and header (scroll-pinned class)
430
+
431
+
This example matches [Sticky columns and header](#sticky-columns-and-header) but uses the `useTheadPinnedFromScrollParent` hook with refs on `InnerScrollContainer` and `Thead` to toggle `isPinned` and apply the placeholder `PINNED` class when the inner scroll container has been scrolled. If the scroll-root ref is not set, the hook falls back to the exported `getOverflowScrollParent` helper using the thead ref.
0 commit comments