diff --git a/package.json b/package.json index c83e23ee4..4dc3b4b0e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/ts/components/collapse.tsx b/src/ts/components/collapse.tsx index a9731058b..ea99359b5 100644 --- a/src/ts/components/collapse.tsx +++ b/src/ts/components/collapse.tsx @@ -134,8 +134,8 @@ export class Collapse extends PureComponent { 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 = { diff --git a/tests/__snapshots__/collapse.tsx.snap b/tests/__snapshots__/collapse.tsx.snap index 44c84801a..f19088592 100644 --- a/tests/__snapshots__/collapse.tsx.snap +++ b/tests/__snapshots__/collapse.tsx.snap @@ -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", } @@ -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", } @@ -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", } @@ -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", } @@ -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", }