more progress

This commit is contained in:
Joeri Exelmans 2025-05-12 11:11:18 +02:00
parent 2b0d8bc2c6
commit ebae0afc81
7 changed files with 94 additions and 21 deletions

View file

@ -19,7 +19,7 @@ export interface InputBlockState {
}
interface InputBlockProps extends State2Props<InputBlockState> {
filter: (ls: any[]) => boolean;
filter: (suggestion: [string, Dynamic]) => boolean;
onResolve: (state: InputBlockState) => void;
onCancel: () => void;
}
@ -120,7 +120,7 @@ export function InputBlock({ state: {kind, env, text, resolved, rollback}, setSt
e.preventDefault();
},
ArrowUp: () => {
setI((i - 1) % suggestions.length);
setI((suggestions.length + i - 1) % suggestions.length);
e.preventDefault();
},
ArrowLeft: () => {