Actions
Feature #84975
openAdd option to BE SplitButton component to right align dropdown items
Status:
New
Priority:
Could have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2018-05-11
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
If a TYPO3\CMS\Backend\Template\Components\Buttons\SplitButton
is placed in ButtonBar::BUTTON_POSITION_RIGHT
it's dropdown items could be too long to display and may be cropped.
Bootstrap3 features a class .dropdown-menu-right
to right align dropdown itms. See https://getbootstrap.com/docs/3.3/components/#btn-dropdowns-dropup
<div class="btn-group dropup"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span> <span class="sr-only">Toggle Dropdown</span></button> <ul class="dropdown-menu dropdown-menu-right"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> </ul> </div>
The relevant part is dropdown-menu-right in <ul class="dropdown-menu dropdown-menu-right">
.
Line 165 in SplitButton->render() always returns hardcoded <ul class="dropdown-menu">
.
Updated by Riccardo De Contardi almost 3 years ago
On Bootstrap 5 that should be .dropdown-menu{-sm|-md|-lg|-xl|-xxl}-end
see
https://getbootstrap.com/docs/5.0/components/dropdowns/#menu-alignment
https://getbootstrap.com/docs/5.0/components/dropdowns/#responsive-alignment
Actions