on 2023 Oct 24 12:12 PM
Hello all,
I'm currently having trouble with changing the width of the list that shows when opening a select field. The select has a width of 100% and spans the entire site, just as I want. But when I open the select and the list for it shows all items have a maximum width of 600px.
Changing the max-width or width properties does nothing to change the width of this list and it always stays at a width of 600px.
I'd be grateful if any of you have insight into why the list of the select behaves in such a way and how I can have the list have the same width as the select field.
Cheers
Request clarification before answering.
Instead of manipulating the internal max-width* of the picker, set the `wrapItemsText` property of the control to true. From the sap.m.Select API reference:
> "Determines whether the text in the items wraps on multiple lines when the available width is not enough. When the text is truncated (wrapItemsText property is set to false), the max width of the SelectList is 600px. When wrapItemsText is set to true, SelectList takes all of the available width."
<Select xmlns="sap.m" wrapItemsText="true">
___
* Please note that "[..] HTML and CSS generated by SAPUI5 isn't part of the public API and may change in patch and minor releases. If you decide to override styles, you need to test and update your modifications each time SAPUI5 is updated. [...] SAP Fiori launchpad apps shouldn't override styles." (Source: Compatibility Rules - SAPUI5)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
davidsigleinit You can find the sap.m.Select sample with wrapItemsText="true" at https://sdk.openui5.org/entity/sap.m.Select/sample/sap.m.sample.SelectWithWrappedItemText/code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please note that "[..] HTML and CSS generated by SAPUI5 isn't part of the public API and may change in patch and minor releases. If you decide to override styles, you need to test and update your modifications each time SAPUI5 is updated. [...] SAP Fiori launchpad apps shouldn't override styles." (Source: Compatibility Rules - SAPUI5)
User | Count |
---|---|
40 | |
15 | |
10 | |
9 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.