Because onThreshold is changed even when it hasn't changed add a check (#63555)

* Because onThreshold is changed even when it hasn't changed add a check

* Fix join
This commit is contained in:
Phillip Burch 2020-04-15 06:43:03 -05:00 committed by GitHub
parent d1134c551e
commit c885ea5379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -399,7 +399,9 @@ export const ExpressionRow: React.FC<ExpressionRowProps> = props => {
const updateThreshold = useCallback(
t => {
setAlertParams(expressionId, { ...expression, threshold: t });
if (t.join() !== expression.threshold.join()) {
setAlertParams(expressionId, { ...expression, threshold: t });
}
},
[expressionId, expression, setAlertParams]
);