Made auto-position behavior optional
This commit is contained in:
parent
38f0313290
commit
590b430fb3
|
@ -62,8 +62,13 @@ export default class Editor extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
// Defaults to true
|
||||
const autoPosition =
|
||||
this.props.autoPosition === undefined ? true : this.props.autoPosition;
|
||||
|
||||
// Init observer (triggers setPosition once)
|
||||
this.removeObserver = this.initResizeObserver();
|
||||
if (autoPosition)
|
||||
this.removeObserver = this.initResizeObserver();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
Loading…
Reference in New Issue