Skip to content

Commit

Permalink
Merge pull request #296 from dabapps/collapse-overflow-0.8.x
Browse files Browse the repository at this point in the history
Collapse overflow 0.8.x
  • Loading branch information
JakeSidSmith authored Mar 7, 2019
2 parents f3e7aff + eaabc73 commit 9391f46
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dabapps/roe",
"version": "0.8.38",
"version": "0.8.39",
"description": "A Collection of React Components for Project Development",
"main": "dist/js/index.js",
"types": "dist/js/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/ts/components/collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ export class Collapse extends PureComponent<CollapseProps, CollapseState> {
minHeight,
maxHeight: opened ? null : height,
position: 'relative' as 'relative',
overflow: 'hidden' as 'hidden',
transition: `ease-in-out ${animationDuration}ms max-height`
overflow: (!opened ? 'hidden' : 'initial') as 'hidden' | 'initial',
transition: `ease-in-out ${animationDuration}ms max-height`,
};

const fadeStyle = {
Expand Down
10 changes: 5 additions & 5 deletions tests/__snapshots__/collapse.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`Collapse should close to custom height 1`] = `
Object {
"maxHeight": null,
"minHeight": null,
"overflow": "hidden",
"overflow": "initial",
"position": "relative",
"transition": "ease-in-out 200ms max-height",
}
Expand Down Expand Up @@ -140,7 +140,7 @@ exports[`Collapse should close to default height 1`] = `
Object {
"maxHeight": null,
"minHeight": null,
"overflow": "hidden",
"overflow": "initial",
"position": "relative",
"transition": "ease-in-out 200ms max-height",
}
Expand Down Expand Up @@ -276,7 +276,7 @@ exports[`Collapse should match snapshot when expanded 1`] = `
Object {
"maxHeight": null,
"minHeight": null,
"overflow": "hidden",
"overflow": "initial",
"position": "relative",
"transition": "ease-in-out 200ms max-height",
}
Expand Down Expand Up @@ -509,7 +509,7 @@ exports[`Collapse should open from custom height 4`] = `
Object {
"maxHeight": null,
"minHeight": null,
"overflow": "hidden",
"overflow": "initial",
"position": "relative",
"transition": "ease-in-out 200ms max-height",
}
Expand Down Expand Up @@ -634,7 +634,7 @@ exports[`Collapse should open from default height 4`] = `
Object {
"maxHeight": null,
"minHeight": null,
"overflow": "hidden",
"overflow": "initial",
"position": "relative",
"transition": "ease-in-out 200ms max-height",
}
Expand Down

0 comments on commit 9391f46

Please sign in to comment.