Feature #84975

Add option to BE SplitButton component to right align dropdown items

Added by Georg Tiefenbrunn about 4 years ago. Updated 6 months ago.

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">.

Also available in: Atom PDF