Project

General

Profile

Actions

Feature #84975

open

Add option to BE SplitButton component to right align dropdown items

Added by Georg Tiefenbrunn almost 6 years ago. Updated over 2 years 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">.

Actions

Also available in: Atom PDF