Commit 74a8ee8
committed
fix(FR-2494): fix stale state on edit open and NaN timeWindow when switching presets
- Add key prop to AutoScalingRuleEditorModal so React remounts when
editingRuleId changes, ensuring useState initializes from the current
autoScalingRule (fixes conditionMode/selectedMetricSource/selectedPresetId
staying stale from the previous create-mode open)
- Guard preset timeWindow auto-fill against NaN: always overwrite the
timeWindow field when switching presets (prevents stale value from
previous preset), and skip if Number() produces NaN1 parent aef8f40 commit 74a8ee8
3 files changed
Lines changed: 819 additions & 4 deletions
File tree
- react/src/components
- resources/i18n
0 commit comments