diff --git a/packages/grafana-ui/src/components/Select/SelectMenu.tsx b/packages/grafana-ui/src/components/Select/SelectMenu.tsx index 0da2f654a1e..593e72866a4 100644 --- a/packages/grafana-ui/src/components/Select/SelectMenu.tsx +++ b/packages/grafana-ui/src/components/Select/SelectMenu.tsx @@ -57,7 +57,7 @@ export const VirtualizedSelectMenu = ({ const styles = getSelectStyles(theme); const listRef = useRef(null); - const focusedIndex = options.findIndex((option: SelectableValue) => option.value === focusedOption.value); + const focusedIndex = options.findIndex((option: SelectableValue) => option.value === focusedOption?.value); useEffect(() => { listRef.current?.scrollToItem(focusedIndex);