import { StandardEditorProps, SelectableValue } from '@grafana/data'; import { HorizontalGroup, RadioButtonGroup } from '@grafana/ui'; import { InputPrefix, NullsThresholdInput } from './NullsThresholdInput'; const GAPS_OPTIONS: Array> = [ { label: 'Never', value: false, }, { label: 'Always', value: true, }, { label: 'Threshold', value: 3600000, // 1h }, ]; type Props = StandardEditorProps; export const SpanNullsEditor = ({ value, onChange, item }: Props) => { const isThreshold = typeof value === 'number'; GAPS_OPTIONS[2].value = isThreshold ? value : 3600000; // 1h return ( {isThreshold && ( )} ); };