on 01-08-2019 6:49 PM
When maxLines is set to 2, everything is displayed as expected. However, when maxLines is set to 1, the only text that is displayed is "lorem ipsum" and there are no ellipises. Is there a fix for this?
var xColumnTemplate = new sap.ui.layout.VerticalLayout({
content: [new sap.m.Text({
text: "hello"
}), new sap.m.Text({
text: "world"
}),
new sap.m.Text({
text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
maxLines: 1
})
]
});
Hi Betty,
It is happening because of the container(Vertical Layout) you have specified to add the texts.
The Layout control width is somehow taking precedence over the text control when length of 1 is specified for Text. (Not sure why). This also modified the property of text wrapping to false.
Remove the container(VerticalLayout) and the text should work fine.
Or try it with a different container (VBOX/FlexBox) to check if it works for you.
Thanks,
Vaibhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello,
try instead of using maxLines, to disable wrapping. might work
S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.