fix(tui): preserve keyboard picker selection
This commit is contained in:
1 parent
252ea18e88
commit
4561c748f6
2 files changed
+32
-1
No files matched your search
@@ -137,7 +137,10 @@ export class PickerMenu<T> {
|
||||
? { backgroundColor: RGBA.fromHex(this.theme.selectedBackground) }
|
||||
: {}),
|
||||
attributes: selected ? TextAttributes.BOLD : 0,
|
||||
onMouseOver: () => {
|
||||
// OpenTUI rechecks hover after rows are rebuilt. Treating that synthetic
|
||||
// `over` as pointer intent would undo a keyboard move whenever the mouse
|
||||
// remains over the previously selected row.
|
||||
onMouseMove: () => {
|
||||
if (this.selected === index) return
|
||||
this.selected = index
|
||||
this.render()
|
||||
|
||||
Reference in new issue
Block a user