mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Refactor get initialHeightClassName()
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
46732dec1f
commit
66a287437a
@ -292,13 +292,9 @@ class NonInjectedMonacoEditor extends React.Component<MonacoEditorProps & Depend
|
|||||||
validateLazy = debounce(this.validate, 250);
|
validateLazy = debounce(this.validate, 250);
|
||||||
|
|
||||||
get initialHeightClassName() {
|
get initialHeightClassName() {
|
||||||
if (!this.props.setInitialHeight) {
|
return this.props.setInitialHeight ?
|
||||||
return;
|
styles[this.props.getEditorHeightFromLinesNumber(this.model.getLineCount())] :
|
||||||
}
|
null;
|
||||||
|
|
||||||
const lines = this.model.getLineCount();
|
|
||||||
|
|
||||||
return styles[this.props.getEditorHeightFromLinesNumber(lines)];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user