Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: accordion observer issues #982

Merged
merged 3 commits into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- Fixed some IE11 flex box bugs and documented others (modal overflowing, image shrinking, and flex group wrapping) ([#973](https://github.com/elastic/eui/pull/973))
- Fixed white square that show in double scollbar via `euiScrollBar()` ([989](https://github.com/elastic/eui/pull/989))
- Fixed issue with Accordion would attempt to use properties and accessors on null ([#982](https://github.com/elastic/eui/pull/982))

## [`1.1.0`](https://github.com/elastic/eui/tree/v1.1.0)

Expand Down
4 changes: 2 additions & 2 deletions src/components/accordion/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export class EuiAccordion extends Component {

setChildContentHeight = () => {
requestAnimationFrame(() => {
const height = this.state.isOpen ? this.childContent.clientHeight : 0;
this.childWrapper.setAttribute('style', `height: ${height}px`);
const height = this.childContent && this.state.isOpen ? this.childContent.clientHeight : 0;
this.childWrapper && this.childWrapper.setAttribute('style', `height: ${height}px`);
});
}

Expand Down