Fix picker sometimes not retaining max height
parent
d155becf23
commit
37d694e183
10
Picker.js
10
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)
|
||||
|
|
Loading…
Reference in New Issue