File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -601,10 +601,10 @@ export default {
601
601
602
602
if ( hasEnoughSpaceBelow || spaceBelow > spaceAbove || this . openDirection === 'below' || this . openDirection === 'bottom' ) {
603
603
this . prefferedOpenDirection = 'below'
604
- this . optimizedHeight = Math . min ( spaceBelow , this . maxHeight ) - 40
604
+ this . optimizedHeight = Math . min ( spaceBelow - 40 , this . maxHeight )
605
605
} else {
606
606
this . prefferedOpenDirection = 'above'
607
- this . optimizedHeight = Math . min ( spaceAbove , this . maxHeight ) - 40
607
+ this . optimizedHeight = Math . min ( spaceAbove - 40 , this . maxHeight )
608
608
}
609
609
}
610
610
}
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ export default {
2
2
data ( ) {
3
3
return {
4
4
pointer : 0 ,
5
- pointerDirty : false ,
6
- visibleElements : this . maxHeight / this . optionHeight
5
+ visibleElements : this . optimizedHeight / this . optionHeight ,
6
+ pointerDirty : false
7
7
}
8
8
} ,
9
9
props : {
@@ -53,7 +53,7 @@ export default {
53
53
if ( this . pointer < this . filteredOptions . length - 1 ) {
54
54
this . pointer ++
55
55
/* istanbul ignore next */
56
- if ( this . $refs . list . scrollTop <= this . pointerPosition - this . visibleElements * this . optionHeight ) {
56
+ if ( this . $refs . list . scrollTop <= this . pointerPosition - ( this . visibleElements - 1 ) * this . optionHeight ) {
57
57
this . $refs . list . scrollTop = this . pointerPosition - ( this . visibleElements - 1 ) * this . optionHeight
58
58
}
59
59
/* istanbul ignore else */
You can’t perform that action at this time.
0 commit comments