Fix #1901: Fix blade console command history

Up or down would not properly update the visible input value
This commit is contained in:
Martin Fournier 2021-12-21 07:35:20 -05:00
parent 0b71a83cfe
commit 1427993a25

@ -104,6 +104,7 @@ export function Console(props: IProps): React.ReactElement {
setConsoleHistoryIndex(i);
const prevCommand = consoleHistory[i];
event.currentTarget.value = prevCommand;
setCommand(prevCommand);
}
if (event.keyCode === 40) {
@ -125,6 +126,7 @@ export function Console(props: IProps): React.ReactElement {
setConsoleHistoryIndex(consoleHistoryIndex + 1);
const prevCommand = consoleHistory[consoleHistoryIndex + 1];
event.currentTarget.value = prevCommand;
setCommand(prevCommand);
}
}
}