Typeahead - Scrollable Dropdown Menu

后端 未结 2 1616
别跟我提以往
别跟我提以往 2021-02-15 11:49

Looks like the CSS isn\'t working for my Typeahead. I am trying to reproduce the Scrollable Dropdown Menu like on https://twitter.github.io/typeahead.js/examples

Here is

相关标签:
2条回答
  • 2021-02-15 12:39

    try this

    document.addEventListener("keydown", function (e) {
    document.getElementById(e.target.attributes['aria- 
               activedescendant'].value).scrollIntoView(true)});
    
    0 讨论(0)
  • 2021-02-15 12:50

    See this GitHub issue. There is an issue with the scrollable dropdown example.

    Update your CSS to:

     #scrollable-dropdown-menu .tt-menu {
       max-height: 150px;
       overflow-y: auto;
       background-color: red;
     }
    
    0 讨论(0)
提交回复
热议问题