更新时间:2023-02-26 08:40:52
下面是一个解决方案。我又增加了指令的预输入li元素 shouldFocus
的手表的积极价值变动。当它调用 scrollIntoView
的元素。
Here is a solution. I added another directive to the typeahead li element shouldFocus
that watches for its active value to change. When it does it calls scrollIntoView
on that element.
我想这被认为是一个黑客,但如果预输入允许动态模板,从标记设置,那么这将是一个有效的修复。
I guess this is considered a hack, but If typeahead allowed for dynamic templates, set from markup, then it would be a valid fix.