diff --git a/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimeRangeList.tsx b/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimeRangeList.tsx index 0833e099046..76676a5bba6 100644 --- a/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimeRangeList.tsx +++ b/packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/TimeRangeList.tsx @@ -8,6 +8,7 @@ import { t } from '../../../utils/i18n'; import { TimePickerTitle } from './TimePickerTitle'; import { TimeRangeOption } from './TimeRangeOption'; +import { useListFocus } from './hooks'; interface Props { title?: string; @@ -44,9 +45,17 @@ export const TimeRangeList = (props: Props) => { const Options = ({ options, value, onChange, title }: Props) => { const styles = useStyles2(getOptionsStyles); + const localRef = React.useRef(null); + const [handleKeys] = useListFocus({ localRef, options }); + return ( <> -