Skip to content

Commit

Permalink
[ML] fix init url value
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Jun 9, 2021
1 parent d388d53 commit 2c36bf3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ export const AnomalyTimeline: FC<AnomalyTimelineProps> = React.memo(
viewBySwimlaneData,
} = explorerState;

const [severityUpdate, setSeverityUpdate] = useState(swimLaneSeverity ?? 0);
const [severityUpdate, setSeverityUpdate] = useState(swimLaneSeverity);

useDebounce(
() => {
if (severityUpdate === swimLaneSeverity) return;

explorerService.setSwimLaneSeverity(severityUpdate);
explorerService.setSwimLaneSeverity(severityUpdate!);
},
500,
[severityUpdate, swimLaneSeverity]
Expand Down Expand Up @@ -207,7 +207,7 @@ export const AnomalyTimeline: FC<AnomalyTimelineProps> = React.memo(

<EuiFlexItem grow={true}>
<SeverityControl
value={severityUpdate}
value={severityUpdate ?? 0}
onChange={useCallback((update) => {
setSeverityUpdate(update);
}, [])}
Expand Down

0 comments on commit 2c36bf3

Please sign in to comment.