-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: sizing issue inside bottom sheet #12
Comments
@bradmartin does it work outside of the bottom sheet ? |
🥸 totally forgot to check, but I believe so, have it in another section of the app and it is fine. Let me double check. |
@bradmartin sorry for the late reply. I ll see what I can do. must be an issue with bottomsheet |
no worries, was gonna try to look into it later today |
I'm also having this issue with HTMLLabel in a RadListView. Some of the cells render the height correctly, but as you scroll down many HTMLLabels have much of the content cut off. |
Just digging in and have some logs and a timeout workaround for my use case for now. onHtmlLabelLoaded(event) {
const x = event.object as Label;
console.log(x.height, x.minHeight, x.textWrap, x.nativeView, x.getActualSize(), x.getMeasuredHeight());
setTimeout(() => {
x.requestLayout();
console.log(x.height, x.minHeight, x.textWrap, x.nativeView, x.getActualSize(), x.getMeasuredHeight());
}, 100);
} before the timeout in the CONSOLE LOG: auto {
"value": 0,
"unit": "px"
} true <UITextView: 0x7f9a55052e00; frame = (0 0; 0 0); text = ''; clipsToBounds = YES; gestureRecognizers = <NSArray: 0x6000023f5560>; layer = <CALayer: 0x600002df3b60>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 0, 0}> {
"width": 0,
"height": 0
} 0 after the timeout: CONSOLE LOG: auto {
"value": 0,
"unit": "px"
} true <UITextView: 0x7f9a55052e00; frame = (0 0; 388 17); text = 'Lorem ipsum some really r...'; clipsToBounds = YES; tag = 175; gestureRecognizers = <NSArray: 0x6000023f5560>; layer = <CALayer: 0x600002df3b60>; contentOffset: {0, 0}; contentSize: {388, 17}; adjustedContentInset: {0, 0, 0, 0}> {
"width": 388,
"height": 17
} 51
|
Okay scratch all of that... even easier workaround for now (tested on iOS Pro 13 max sim and google pixel 4): onHtmlLabelLoaded(event) {
const x = event.object as Label;
x.text = this._params.context.label;
} instead of ngOnInit() {
Logger.info('ConfirmationDialogComponent.ngOnInit()', this._params.context);
this.title = this._params.context.title;
this.label = this._params.context.label;
} This is dependent on my layout having <GridLayout row="1" colSpan="2" rows="*" columns="*">
<HTMLLabel
fontSize="14"
[html]="label"
linkColor="#336699"
linkUnderline="true"
(linkTap)="onLinkTap($event)"
textWrap="true"
(loaded)="onHtmlLabelLoaded($event)"
marginBottom="10"
></HTMLLabel>
</GridLayout> |
@bradmartin I tried your solution but i get this when I try setting the
Any ideas? |
I'd try dropping the timeout and then maybe calling the |
@bradmartin i cant reproduce the issue here. Can you manage to reproduce it in a simple repro example not angular? |
@farfromrefug have you tried it in a rad List view? I imagine it's the same problem. |
No and I am not sure it is the same issue. Plus RLV is too much of a mess and impossible to debug (the simple way). Tbh I don't trust RLV so I couldnt say if the issue comes from RLV or ui-label. So I prefer to debug this with bottomsheet |
It could be an angular issue since that's something Dave and I have in common here. If you can't repro it without angular, I'm guessing something with the UI and angular data binding possibly causes, which is why the workarounds I've tried seem to be a "fix" for now. If you already tried to repro it without angular I won't waste my time 👍🏻 thanks for trying though. I know these issues are odd, luckily I worked around mine with the approach of databinding with the loaded event and not the component init. |
@bradmartin I did try but maybe my example was not reproducing the full context of your app. |
Make sure to check the demo app(s) for sample usage
Make sure to check the existing issues in this repository
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
package.json
file of yourproject and paste your dependencies and devDependencies here)
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
Is there any code involved?
The fix is by explicitly putting a height value on the HTMLLabel, ideally it should scale and be visible (since textWrap is true).
When
height=300
is on theHTMLLabel
the full text of the item is shown, but not ideal since the message in the label can vary in length.Works but obviously having the large gap not defined in the layout is a negative.
The text was updated successfully, but these errors were encountered: