refactor(cli): keyboard handling and AskUserDialog (#17414)

This commit is contained in:
Jacob Richman
2026-01-27 14:26:00 -08:00
committed by GitHub
parent 3103697ea7
commit b51323b40c
46 changed files with 1220 additions and 385 deletions
@@ -32,6 +32,7 @@ export interface BaseSelectionListProps<
maxItemsToShow?: number;
wrapAround?: boolean;
focusKey?: string;
priority?: boolean;
renderItem: (item: TItem, context: RenderItemContext) => React.ReactNode;
}
@@ -63,6 +64,7 @@ export function BaseSelectionList<
maxItemsToShow = 10,
wrapAround = true,
focusKey,
priority,
renderItem,
}: BaseSelectionListProps<T, TItem>): React.JSX.Element {
const { activeIndex } = useSelectionList({
@@ -74,6 +76,7 @@ export function BaseSelectionList<
showNumbers,
wrapAround,
focusKey,
priority,
});
const [scrollOffset, setScrollOffset] = useState(0);