Explorar o código

use .componentDidUpdate in SliderBase

Alexander Rose %!s(int64=5) %!d(string=hai) anos
pai
achega
01cca9e8a6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;