Skip to content

Commit

Permalink
add a stickyHeader prop
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 27, 2019
1 parent 9290599 commit f95512e
Show file tree
Hide file tree
Showing 11 changed files with 337 additions and 403 deletions.
1 change: 1 addition & 0 deletions docs/pages/api/table-cell.md
Expand Up @@ -56,6 +56,7 @@ Any other props supplied will be provided to the root element (native element).
| <span class="prop-name">alignCenter</span> | <span class="prop-name">MuiTableCell-alignCenter</span> | Styles applied to the root element if `align="center"`.
| <span class="prop-name">alignRight</span> | <span class="prop-name">MuiTableCell-alignRight</span> | Styles applied to the root element if `align="right"`.
| <span class="prop-name">alignJustify</span> | <span class="prop-name">MuiTableCell-alignJustify</span> | Styles applied to the root element if `align="justify"`.
| <span class="prop-name">stickyHeader</span> | <span class="prop-name">MuiTableCell-stickyHeader</span> | Styles applied to the root element if `context.table.stickyHeader={true}`.

You can override the style of the component thanks to one of these customization points:

Expand Down
2 changes: 2 additions & 0 deletions docs/pages/api/table.md
Expand Up @@ -29,6 +29,7 @@ You can learn more about the difference by [reading our guide](/guides/minimizin
| <span class="prop-name">component</span> | <span class="prop-type">elementType</span> | <span class="prop-default">'table'</span> | The component used for the root node. Either a string to use a DOM element or a component. |
| <span class="prop-name">padding</span> | <span class="prop-type">'default'<br>&#124;&nbsp;'checkbox'<br>&#124;&nbsp;'none'</span> | <span class="prop-default">'default'</span> | Allows TableCells to inherit padding of the Table. |
| <span class="prop-name">size</span> | <span class="prop-type">'small'<br>&#124;&nbsp;'medium'</span> | <span class="prop-default">'medium'</span> | Allows TableCells to inherit size of the Table. |
| <span class="prop-name">stickyHeader</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | Set the header sticky.<br>⚠️ It doesn't work with IE 11. |

The `ref` is forwarded to the root element.

Expand All @@ -42,6 +43,7 @@ Any other props supplied will be provided to the root element (native element).
| Rule name | Global class | Description |
|:-----|:-------------|:------------|
| <span class="prop-name">root</span> | <span class="prop-name">MuiTable-root</span> | Styles applied to the root element.
| <span class="prop-name">stickyHeader</span> | <span class="prop-name">MuiTable-stickyHeader</span> | Styles applied to the root element if `stickyHeader={true}`.

You can override the style of the component thanks to one of these customization points:

Expand Down

0 comments on commit f95512e

Please sign in to comment.