Set exemplars to falsee if they are disabled
This commit is contained in:
@@ -25,6 +25,13 @@ export function PromExemplarField({ datasource, onChange, isEnabled, refId }: Pr
|
||||
};
|
||||
}, [datasource, refId]);
|
||||
|
||||
// If exemplars are disabled, set them to false
|
||||
useEffect(() => {
|
||||
if (error) {
|
||||
onChange(false);
|
||||
}
|
||||
}, [error, onChange]);
|
||||
|
||||
const iconButtonStyles = cx(
|
||||
{
|
||||
[styles.activeIcon]: isEnabled,
|
||||
|
||||
Reference in New Issue
Block a user