Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

bugfix: TimeRangeSlider should not cache props.onChange (#100)

Rick Zhou7cbbb8b8d228
diff --git a/src/components/common/time-range-slider.js b/src/components/common/time-range-slider.js
index c09bb0d2c..187150549 100644
--- a/src/components/common/time-range-slider.js
+++ b/src/components/common/time-range-slider.js
@@ -65,7 +65,7 @@ export default class TimeRangeSlider extends Component {
width: 288
};
this._animation = null;
- this._sliderThrottle = throttle(this.props.onChange, 20);
+ this._sliderThrottle = throttle((...value) => this.props.onChange(...value), 20);
}
componentDidUpdate() {