Browse Source

linter fixes

pull/5/head
rozetko 9 months ago
parent
commit
37d2b68a67
  1. 8
      src/components/editors/ThresholdsEditor.tsx
  2. 4
      src/components/editors/UseMetricEditor.tsx
  3. 2
      src/utils.ts

8
src/components/editors/ThresholdsEditor.tsx

@ -115,7 +115,13 @@ export function ThresholdsEditor({ onChange, value, context }: StandardEditorPro
placeholder="value"
width={24}
value={threshold.value}
onChange={(evt) => onThresholdFieldChange(thresholdIdx, 'value', isNumber(evt.currentTarget.value) ? +evt.currentTarget.value : undefined)}
onChange={(evt) =>
onThresholdFieldChange(
thresholdIdx,
'value',
isNumber(evt.currentTarget.value) ? +evt.currentTarget.value : undefined
)
}
/>
)}
</InlineField>

4
src/components/editors/UseMetricEditor.tsx

@ -50,7 +50,9 @@ export function UseMetricEditor({ onChange, value, context }: StandardEditorProp
placeholder="value"
value={config?.value}
width={24}
onChange={(evt) => onFieldChange('value', isNumber(evt.currentTarget.value) ? +evt.currentTarget.value : undefined)}
onChange={(evt) =>
onFieldChange('value', isNumber(evt.currentTarget.value) ? +evt.currentTarget.value : undefined)
}
/>
)}
</InlineField>

2
src/utils.ts

@ -26,7 +26,7 @@ export function getLastMetricValue(
metricName: string | undefined,
optionName: string
): number | null {
if(metricName === undefined) {
if (metricName === undefined) {
return null;
}
// optionName -> helper in Error, mb use option path instead

Loading…
Cancel
Save