diff --git a/Picker.js b/Picker.js index 3fb72a7..c933b41 100644 --- a/Picker.js +++ b/Picker.js @@ -4,7 +4,7 @@ // ...Or maybe a button with a popup menu // License: LGPLv3.0+ // (c) Vitaliy Filippov 2019+ -// Version 2021-10-07 +// Version 2021-11-17 import React from 'react'; import ReactDOM from 'react-dom'; @@ -216,15 +216,15 @@ export default class Picker extends React.Component ? ReactDOM.findDOMNode(this.input).getBoundingClientRect() : { left: this.props.popupX||0, top: this.props.popupY||0 }; const pos = Picker.calculatePopupPosition(inputRect, this.picker, this.props); + if (ph && ph != 'auto') + { + this.picker.style.height = ph; + } if (this.state.top !== pos.top || this.state.left !== pos.left || this.state.width !== pos.width || this.state.height !== pos.height) { this.setState(pos); } - else if (ph) - { - this.picker.style.height = ph; - } } static getScrollHeight(el)