mirror of
https://github.com/Sonarr/Sonarr
synced 2025-03-04 10:39:34 +00:00
Remove Measure
This commit is contained in:
parent
7644cec376
commit
ee46e6378a
1 changed files with 0 additions and 38 deletions
|
@ -1,38 +0,0 @@
|
||||||
import _ from 'lodash';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import React, { Component } from 'react';
|
|
||||||
import ReactMeasure from 'react-measure';
|
|
||||||
|
|
||||||
class Measure extends Component {
|
|
||||||
|
|
||||||
//
|
|
||||||
// Lifecycle
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
this.onMeasure.cancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Listeners
|
|
||||||
|
|
||||||
onMeasure = _.debounce((payload) => {
|
|
||||||
this.props.onMeasure(payload);
|
|
||||||
}, 250, { leading: true, trailing: false });
|
|
||||||
|
|
||||||
//
|
|
||||||
// Render
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<ReactMeasure
|
|
||||||
{...this.props}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Measure.propTypes = {
|
|
||||||
onMeasure: PropTypes.func.isRequired
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Measure;
|
|
Loading…
Add table
Reference in a new issue