mimir-ui-kit 1.27.6 → 1.27.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -57,12 +57,10 @@ const Steps = forwardRef(
|
|
57
57
|
}, [current]);
|
58
58
|
useEffect(() => {
|
59
59
|
if (fillByActualZone) {
|
60
|
-
const zone = zones.find((zone2) => zone2.to >= (step2
|
61
|
-
|
62
|
-
setCurrentColor(zone.color);
|
63
|
-
}
|
60
|
+
const zone = zones.find((zone2) => zone2.to >= (step2 || 0));
|
61
|
+
zone && setCurrentColor(zone.color);
|
64
62
|
}
|
65
|
-
}, []);
|
63
|
+
}, [fillByActualZone, step2, zones]);
|
66
64
|
const handleClick = (idx) => {
|
67
65
|
const clickedStep = idx + DIFF_BETWEEN_STEP_AND_INDEX;
|
68
66
|
stepWasChangedRef.current = true;
|