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

How to change width of ui5-select?

Open pta-nmu opened this issue 6 years ago • 3 comments

Hi,

Could you please post how to change the width of a control in Angular (in the html template)? It's not documented anywhere. Using has no effect.

Thanks for your help

pta-nmu avatar Oct 29 '20 16:10 pta-nmu

Hello @pta-nmu

Does not applying standard CSS work?

ui5-select {
width: 50px;
min-width: 50px;
}

ilhan007 avatar Oct 30 '20 05:10 ilhan007

Hi, Thanks for your feedback. Using css works above a certain width (e.g. width: 90%, but it seems to have a minimum width of approx. 200px. If you try to set the width to less than that it does not accept it. We would like to make the selects as small as possible because their content is short (see screenshot). Please let us know if there is a way of doing this. short-ui5-select

pta-nmu avatar Oct 30 '20 07:10 pta-nmu

Hi @pta-nmu

I have created an example how you can change the width of the select.

PS: I would not recommend going for width under 70px, because then there would not be enough space for the arrow.

fifoosid avatar Oct 30 '20 10:10 fifoosid