Explorar o código

fix Slider2 bug

David Sehnal %!s(int64=4) %!d(string=hai) anos
pai
achega
410655052f
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

@@ -86,7 +86,7 @@ export class Slider2 extends React.Component<{
     state = { isChanging: false, current: [0, 1] as [number, number] }
 
     static getDerivedStateFromProps(props: { value: [number, number] }, state: { isChanging: boolean, current: [number, number] }) {
-        if (state.isChanging || (props.value[0] === state.current[0]) && (props.value[1] === state.current[1])) return null;
+        if (state.isChanging || (props.value[0] === state.current[0] && props.value[1] === state.current[1])) return null;
         return { current: props.value };
     }