There are situations where while typing into the Combobox the selected item does not scroll into view, when there doesn't seem to be a functional reason why that would be.
Specifically, this seems to be an issue with either the inline or none autocomplete setting.
If you type 'a', you will see the first option become selected. If you continue typing by adding 'b' ('ab' is now in the input), you will see that 'ab' is not scrolled into view, though it is indeed selected which you can see if you scroll down manually. If you instead, from an empty input, typed in 'z', you will see 'zoo' be immediately scrolled into view.
🤔 Expected Behavior
Any newly selected item as you type should be scrolled into view.
😯 Current Behavior
Newly selected items as you type with either the inline or noneautocomplete setting at times are not scrolled into view (see reproducing example above)).
💁 Possible Solution
It seems like the Combobox should just call its focusAndScrollOptionIntoView method more aggressively. I imagine in the inputHandler implementation you could just always call it, or at worst, scope it to if the current input value (this.control.value) is not the same as this.value.
🐛 Bug Report
There are situations where while typing into the Combobox the selected item does not scroll into view, when there doesn't seem to be a functional reason why that would be.
Specifically, this seems to be an issue with either the
inline
ornone
autocomplete setting.💻 Repro or Code Sample
Stackblitz example
If you type 'a', you will see the first option become selected. If you continue typing by adding 'b' ('ab' is now in the input), you will see that 'ab' is not scrolled into view, though it is indeed selected which you can see if you scroll down manually. If you instead, from an empty input, typed in 'z', you will see 'zoo' be immediately scrolled into view.
🤔 Expected Behavior
Any newly selected item as you type should be scrolled into view.
😯 Current Behavior
Newly selected items as you type with either the
inline
ornone
autocomplete
setting at times are not scrolled into view (see reproducing example above)).💁 Possible Solution
It seems like the Combobox should just call its
focusAndScrollOptionIntoView
method more aggressively. I imagine in theinputHandler
implementation you could just always call it, or at worst, scope it to if the current input value (this.control.value
) is not the same asthis.value
.🔦 Context
https://github.com/ni/nimble/issues/1325
🌍 Your Environment