ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

SplitButton: No truncation with ellipsis for long texts in SplitButton

Open arijitpatra-sap opened this issue 4 months ago • 1 comments

Describe the bug

Right now it seems there is no way I can truncate long text in SplitButton with ellipsis

I also tried with the Text component as a child with maxLines 1, but that too didn't work and moreover on using the Text component as a child the styling of the text is not like that of SplitButton's.

It would be good to support truncation of long text in SplitButton.

This shows an example of long text in SplitButton: Image

Isolated Example

No response

Reproduction steps

Add a very long text to the SplitButton and see

Expected Behaviour

this is what is desired (right now not possible with the current SplitButton):

Image

Screenshots or Videos

This shows an example of long text in SplitButton:

Image

and this is what is desired (right now not possible with the current SplitButton):

Image

UI5 Web Components for React Version

2.11.1

UI5 Web Components Version

2.11.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output


Organization

No response

Declaration

  • [x] I’m not disclosing any internal or sensitive information.

arijitpatra-sap avatar Jun 27 '25 11:06 arijitpatra-sap

Hello @SAP/ui5-webcomponents-topic-b,

Could you please take a look?

nnaydenow avatar Jun 27 '25 11:06 nnaydenow

Hi @arijitpatra-sap,

The desired behaviour could be achieved following the responsive behaviour of the components: https://www.sap.com/design-system/fiori-design-web/ui-elements/button-web-component/?external#responsive-behavior . This is a link with example: Split Button text truncation (text-overflow-ellipsis)

Regards, Georgi

GDamyanov avatar Jul 17 '25 14:07 GDamyanov

This issue has been closed. To reopen, just leave a comment!

github-actions[bot] avatar Jul 17 '25 14:07 github-actions[bot]

Hi @GDamyanov

I checked your solution, unfortunately it doesn't address my use case... the split button that I have is on a side panel and the width of the button grows till the max-width of the button when resizing the side panel.

So I cannot put a static width to the split button.

arijitpatra-sap avatar Aug 05 '25 22:08 arijitpatra-sap