Position of modal on button group
Position of modal on button group
Is there a standard way to alter the positioning of the menu/pop-up that displays when clicking on a button group? Currently, the group appears to align to the left edge of its parent button and if the buttons are on the right side of the interface, it spills off the page to the right. For pop-ups (like for the SearchBuilder button) I would love to be able to position it as fixed and for the drop-down-type button groups I'd like them to drop-down to the left if possible.
This question has an accepted answers - jump to answer
Answers
Finally pinned it down with a custom class name and some jquery styling:
But, if there's a more "standard" way to do this, happy to know!
You can use the
collectionLayout
option of any button that extends thecollection
button type, which you can see in action here.Unfortunately, SearchBuilder's button doesn't extend that button type - it calls the
button().popover()
method directly:Perhaps I should make a way for the SearchBuilder button to specify those options... I can look into that if it would be useful for you.
Allan
Nice, I didn't know about collection layout! I think being able to specify those options within SearchBuilder would be grand. That said, I did end up with a working solution, so don't rush for me.
Awesome - good to hear you've got a working solution!
Allan
I wasted 3 good hours trying to figure out why
collectionLayout
wasn't working for searchBuilder button. @allan please were you able to look into this? I think been able to at least specifycollectionLayout
will be very handy.Thanks
Sorry to hear this cost you some time. No, I haven't yet made any changes for this. It does seem like a good idea though. Added to the list.
Allan
Great. Thanks