Is it possible to force the buttons collection to display above the generating button ?
Is it possible to force the buttons collection to display above the generating button ?
I am having an issue after the updating to buttons 2.2.2 that is causing button collection to display below my button that generates it.
Sometime it displays above but more often it displays below causing the user to have to scroll down to use the buttons.
Here is a screen shot before generating the collection that shows there is no scroll bar so there is nothing below the table.
When I generate the collection it gets placed below causing the scroll bar to appear.
The Visibility button does this less often. Seen here
But sometimes it does happen.
The randomness of this is making it more annoying then if it was always below although what I want is for it to always display above.
I can't recreate in datatables live or jsfiddle because of the way they wrap things in frames. So I don't know how to provide a demo to prove the issue.
This question has an accepted answers - jump to answer
Answers
With more testing I am finding that I have to leave about 1 button of white space at the bottom for the menu to randomly appear below. If I size my window the the buttons almost touch the bottom of the page then the menus always display above.
But with a little bit of white space at the bottom the PDF window starts displaying below. About 1.5 button hight of white space is required.
However the larger Visibility menu doesn't start unless there is much more space.
It appears that as long as all but 2 buttons can be displayed below then it puts it below. Leaving 2 buttons off screen.
NOTE the screen shots above might show Visibility having the issue with only 1 button of white space. But that was caused by some code I was trying to fix this. I remove that code and the behavior I am now describing is pretty consistent.
The
dropup
option of thecollection
button will do it. As long as there is space above the button. If there isn't it will auto correct and show the collection below.Allan