mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
Fixed: Author/Book overview overflows
Bump react-measure to v2.5.2
This commit is contained in:
@@ -16,23 +16,46 @@ class Measure extends Component {
|
||||
// Listeners
|
||||
|
||||
onMeasure = _.debounce((payload) => {
|
||||
this.props.onMeasure(payload);
|
||||
}, 250, { leading: true, trailing: false })
|
||||
this.props.onMeasure(payload.bounds);
|
||||
}, 250, { leading: true, trailing: true })
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
render() {
|
||||
const {
|
||||
className,
|
||||
style,
|
||||
onMeasure,
|
||||
children,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<ReactMeasure
|
||||
{...this.props}
|
||||
/>
|
||||
bounds={true}
|
||||
onResize={this.onMeasure}
|
||||
{...otherProps}
|
||||
>
|
||||
{({ measureRef }) => (
|
||||
<div
|
||||
ref={measureRef}
|
||||
className={className}
|
||||
style={style}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
)}
|
||||
</ReactMeasure>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Measure.propTypes = {
|
||||
onMeasure: PropTypes.func.isRequired
|
||||
className: PropTypes.string,
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
||||
onMeasure: PropTypes.func.isRequired,
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
export default Measure;
|
||||
|
||||
Reference in New Issue
Block a user