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:
218
218
determines the value of AlignToTop that is given into scrollIntoView() when scrolling Omnibox
219
219
suggestions into view. Defaults to false. It's useful to configure this when using the Omnibox
220
220
inside 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.
221
223
222
224
## Omnibox Event Bindings
223
225
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ import NgcOmniboxController from './ngcOmniboxController.js';
42
42
* determines the value of AlignToTop that is given into scrollIntoView() when scrolling
43
43
* Omnibox suggestions into view. Defaults to false. It's useful to configure this when
44
44
* 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.
45
47
*
46
48
* The component has no template, all content that does not map to one of the sub-components will
47
49
* be displayed in the final output as-is and un-modified.
@@ -74,6 +76,7 @@ export default {
74
76
onUnchosen : '&' ,
75
77
onShowSuggestions : '&' ,
76
78
onHideSuggestions : '&' ,
77
- scrollIntoViewAlignToTop : '<?'
79
+ scrollIntoViewAlignToTop : '<?' ,
80
+ shouldScrollIntoView : '<?'
78
81
}
79
82
} ;
Original file line number Diff line number Diff line change @@ -726,6 +726,9 @@ export default class NgcOmniboxController {
726
726
}
727
727
728
728
_scrollSuggestionIntoView ( ) {
729
+ if ( this . shouldScrollIntoView === false ) {
730
+ return ;
731
+ }
729
732
// Disable highlighting while scrolling so the mouse doesn't accidentally highlight a new item
730
733
this . isHighlightingDisabled = true ;
731
734
You can’t perform that action at this time.
0 commit comments