Skip to content

Commit 1f9b657

Browse files
committed
[bugfix] Add style={{ display }} back to CustomElement so that custom left panel can be shown and hidden correctly. However if this.props.display is not defined we don't want to set inline display to 'flex'. Doing that will force customElement in the header always to visible
1 parent 3635a51 commit 1f9b657

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/CustomElement/CustomElement.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class CustomElement extends React.PureComponent {
1313
dataElement: PropTypes.string,
1414
display: PropTypes.string,
1515
render: PropTypes.func.isRequired,
16+
mediaQueryClassName: PropTypes.string
1617
}
1718

1819
constructor(props) {
@@ -62,6 +63,7 @@ class CustomElement extends React.PureComponent {
6263
className={[className, mediaQueryClassName].join(' ').trim()}
6364
ref={this.elementWrapper}
6465
data-element={dataElement}
66+
style={{ display }}
6567
>
6668
{this.state.isRenderingReactComponent &&
6769
render()

0 commit comments

Comments
 (0)