fix: alert threshold disappears on run query (#2888)

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
Chintan Sudani 2023-06-12 14:48:01 +05:30 committed by GitHub
parent 754ba93df9
commit bd6745dd66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,12 +140,14 @@ function RuleOptions({
{queryCategory === EQueryType.PROM {queryCategory === EQueryType.PROM
? renderPromRuleOptions() ? renderPromRuleOptions()
: renderThresholdRuleOpts()} : renderThresholdRuleOpts()}
<InputNumber <Form.Item name={['condition', 'target']}>
addonBefore={t('field_threshold')} <InputNumber
value={alertDef?.condition?.target} addonBefore={t('field_threshold')}
onChange={onChange} value={alertDef?.condition?.target}
type="number" onChange={onChange}
/> type="number"
/>
</Form.Item>
</FormContainer> </FormContainer>
</> </>
); );