Open designsbyali opened 8 years ago
Sol tries to fit the popup in your viewport. If it detects, that the dropdown would extend over the page bottom, it opens the popup at the top. This is quite useful if you have a Sol element at the very bottom of your page. If the popup would open to the bottom and you have no more space to scroll down, you would not be able to select anything.
Right now there is no option to force it to display at the bottom (to the top would work though). It is quite hard do decide in code whether to open to the top or bottom so I'm afraid I can't provide a solution that fits all scenarios. The way it's implemented right now is the best compromise in my opinion.
You may provide your own positioning logic though, by overwriting the onScroll
function. You might simply copy the whole thing from the sol sources and just change the line reading
displayContainerAboveInput = this.config.displayContainerAboveInput || document.documentElement.clientHeight - this.config.scrollTarget.scrollTop() < selectionContainerBottom,
to
displayContainerAboveInput = false,
and all your sol elements will alway open to the bottom
i have added all the file but when I click on input button the results show up side and I want it show like dropdown