diff --git a/lib/components/term.tsx b/lib/components/term.tsx index 80fd48ea..914a8c9e 100644 --- a/lib/components/term.tsx +++ b/lib/components/term.tsx @@ -188,6 +188,12 @@ export default class Term extends React.PureComponent { this.searchAddon = props.searchAddon!; } + try { + this.term.element!.style.padding = props.padding; + } catch (error) { + console.log(error); + } + this.fitAddon.fit(); if (this.props.isTermActive) { @@ -377,6 +383,12 @@ export default class Term extends React.PureComponent { this.termOptions = nextTermOptions; + try { + this.term.element!.style.padding = this.props.padding; + } catch (error) { + console.log(error); + } + if ( this.props.fontSize !== prevProps.fontSize || this.props.fontFamily !== prevProps.fontFamily || @@ -427,12 +439,7 @@ export default class Term extends React.PureComponent { render() { return ( -
+
{this.props.customChildrenBefore}
{this.props.customChildren}