Pārlūkot izejas kodu

use .componentDidUpdate in SliderBase

Alexander Rose 5 gadi atpakaļ
vecāks
revīzija
01cca9e8a6
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/mol-plugin/ui/controls/slider.tsx

+ 1 - 1
src/mol-plugin/ui/controls/slider.tsx

@@ -320,7 +320,7 @@ export class SliderBase extends React.Component<SliderBaseProps, SliderBaseState
     private startValue = 0;
     private _getPointsCache: any = void 0;
 
-    componentWillReceiveProps(nextProps: SliderBaseProps) {
+    componentDidUpdate(nextProps: SliderBaseProps) {
         if (!('value' in nextProps || 'min' in nextProps || 'max' in nextProps)) return;
 
         const { bounds } = this.state;