Skip to content

Commit

Permalink
[Collapse] Don't consider hidden if collapsedHeight > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Feb 12, 2019
1 parent 59ee3e5 commit bf011ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/material-ui/src/Collapse/Collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export const styles = theme => ({
height: 'auto',
overflow: 'visible',
},
/* Styles applied to the container element when the transition has exited. */
// eslint-disable-next-line max-len
/* Styles applied to the container element when the transition has exited and `collapsedHeight` != 0px. */
hidden: {
vibility: 'hidden',
},
Expand Down Expand Up @@ -156,7 +157,7 @@ class Collapse extends React.Component {
>
{(state, childProps) => (
<Component
aria-hidden={state === 'exited'}
aria-hidden={state === 'exited' && collapsedHeight === '0px'}
className={clsx(
classes.container,
{
Expand Down
2 changes: 1 addition & 1 deletion pages/api/collapse.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This property accepts the following keys:
|:-----|:------------|
| <span class="prop-name">container</span> | Styles applied to the container element.
| <span class="prop-name">entered</span> | Styles applied to the container element when the transition has entered.
| <span class="prop-name">exited</span> | Styles applied to the container element when the transition has exited.
| <span class="prop-name">hidden</span> | Styles applied to the container element when the transition has exited and `collapsedHeight` != 0px.
| <span class="prop-name">wrapper</span> | Styles applied to the outer wrapper element.
| <span class="prop-name">wrapperInner</span> | Styles applied to the inner wrapper element.

Expand Down

0 comments on commit bf011ce

Please sign in to comment.