Fix: avoid setting undefined for preferredSize for the <Allotment.Pane>

This commit is contained in:
Laurent Nguyen 2024-11-14 17:08:19 +01:00
parent 624f2fb5a5
commit ac619cbbe2

View File

@ -739,7 +739,12 @@ class QueryTabComponentImpl extends React.Component<QueryTabComponentImplProps,
this.setState({ queryViewSizePercent }, () => this.saveQueryTabStateDebounced());
}}
>
<Allotment.Pane data-test="QueryTab/EditorPane" preferredSize={`${this.state.queryViewSizePercent}%`}>
<Allotment.Pane
data-test="QueryTab/EditorPane"
preferredSize={
this.state.queryViewSizePercent !== undefined ? `${this.state.queryViewSizePercent}%` : undefined
}
>
<EditorReact
ref={this.queryEditor}
className={this.props.styles.queryEditor}