File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,8 @@ behavior of the omnibox:
218218determines the value of AlignToTop that is given into scrollIntoView() when scrolling Omnibox
219219suggestions into view. Defaults to false. It's useful to configure this when using the Omnibox
220220inside of a scrollable container.
221+ - ` shouldScrollIntoView {Boolean} ` : An expression that should evaluate to a Boolean that
222+ determines whether to scroll suggestions into view at all. Defaults to true.
221223
222224## Omnibox Event Bindings
223225
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ import NgcOmniboxController from './ngcOmniboxController.js';
4242 * determines the value of AlignToTop that is given into scrollIntoView() when scrolling
4343 * Omnibox suggestions into view. Defaults to false. It's useful to configure this when
4444 * using the Omnibox inside of a scrollable container.
45+ * - `shouldScrollIntoView {Boolean}`: An expression that should evaluate to a Boolean that
46+ * determines whether to scroll suggestions into view at all. Defaults to true.
4547 *
4648 * The component has no template, all content that does not map to one of the sub-components will
4749 * be displayed in the final output as-is and un-modified.
@@ -74,6 +76,7 @@ export default {
7476 onUnchosen : '&' ,
7577 onShowSuggestions : '&' ,
7678 onHideSuggestions : '&' ,
77- scrollIntoViewAlignToTop : '<?'
79+ scrollIntoViewAlignToTop : '<?' ,
80+ shouldScrollIntoView : '<?'
7881 }
7982} ;
Original file line number Diff line number Diff line change @@ -726,6 +726,9 @@ export default class NgcOmniboxController {
726726 }
727727
728728 _scrollSuggestionIntoView ( ) {
729+ if ( this . shouldScrollIntoView === false ) {
730+ return ;
731+ }
729732 // Disable highlighting while scrolling so the mouse doesn't accidentally highlight a new item
730733 this . isHighlightingDisabled = true ;
731734
You can’t perform that action at this time.
0 commit comments