Skip to content

Commit

Permalink
[Bug] Fix Range brush maximum update exceeds crashes (#1955)
Browse files Browse the repository at this point in the history
* disable resize to avoid max depth error
* add debounce
  • Loading branch information
igorDykhta committed Aug 27, 2022
1 parent f948501 commit 47a184c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/common/range-slider.tsx
Expand Up @@ -121,14 +121,10 @@ export default function RangeSliderFactory(

componentDidMount() {
if (this.sliderContainer instanceof Element) {
observeDimensions(this.sliderContainer, this._resize);
observeDimensions(this.sliderContainer, this._resize, 100);
}
}

componentDidUpdate() {
this._resize();
}

componentWillUnmount() {
if (this.sliderContainer instanceof Element) {
unobserveDimensions(this.sliderContainer);
Expand Down

0 comments on commit 47a184c

Please sign in to comment.