Handle dropdown scrolling when larger that the viewport

This commit is contained in:
Frederic Guillot 2016-12-11 20:01:17 -05:00
parent ed406b7997
commit f83178bef8
4 changed files with 5 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -161,6 +161,7 @@ KB.component('select-dropdown-autocomplete', function(containerElement, options)
.style('top', componentPosition.bottom + 'px')
.style('left', componentPosition.left + 'px')
.style('width', componentPosition.width + 'px')
.style('maxHeight', (window.innerHeight - componentPosition.bottom - 20) + 'px')
.mouseover(onItemMouseOver)
.click(onItemClick)
.for('li', itemElements)

View File

@ -11,6 +11,7 @@
border: 1px solid #ccc
border-radius: 3px
box-shadow: 0 6px 12px rgba(0, 0, 0, .175)
overflow: scroll
.select-dropdown-menu-item
white-space: nowrap