-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[TNS 3.0] iOS:Layout will not update on modal page #4151
Comments
Hi @kssfilo, |
You have to write updating text code into Tap handler not loaded(). like this.
Additionally,If xml's Label is "visibility='collapsed'" and change it to "visible" on Tap handler, nothing shown. I found that similar problem happens not only textWrap/ height property or visibility property and StackLayout.
in case Button ui is like above, if you change button1's text to 'veeeryLong" in Tap handler, button will be '.....'. It seems same issue of updating layout in Modal page. |
Only workaround I found is calling this after changing properties. (but it's difficult when property is bound to model.)
|
Hi @kssfilo, |
OK. Thank you. |
Sorry, I checked again, workaround above is not effective. only valid workaround currently is calling ""Page.nativeView.setNeedsLayout()" after changing property. |
It seems to be affecting usage of *ngIf and *ngSwitch on angular as well. I made a fork of sdk-examples-ng repo here: https://github.com/piotrilski/nativescript-sdk-examples-ng/tree/pilski/modal-issue |
Hi @kssfilo, @piotrilski indeed there is an issue with using |
https://github.com/kssfilo/NativeScript/tree/fix-modal-layout I made some change to tns-core-modules and send PR #4170 . My apps and @tsonevn 's sample app are working like before 3.0.0 without "Page.nativeView.setNeedsLayout()" workaround now. |
Ah! This sounds like the cause of one of the MAJOR headaches I'm having upgrading a 2.5 iOS app to 3.0. Before 3.0, I was able to hide/show layouts in a modal view using model properties bound to the Gave this workaround a quick test and it works! This is definitely a regression in the layout system. @tsonevn We should prioritize this bug/fix given that it is a breaking change regression in 3.0 from 2.5.x. |
Hi, the fix is merged in master and already available with tns-core-modules@next so any feedback will be highly appreciated. |
Thanks! Will give it a try as soon as I can. |
Fix will be released in 3.0.1 later this week. |
@dtopuzov Great! Will that version be 3.1.0? Or 3.0.2? I think 3.0.1 is already released. :) |
Fix will be in |
Got it! Thanks for clarifying. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
Please tell us how to recreate the issue in as much detail as possible.
-> text will be not wrapped(label1) and text will not be shown (label2)
Besides this issue, I found that another UI has similar problem in modal page. such as Html or Image. when expanding height of these UI parts programmatically, no layout change happens.
When text or src or html property is bound to model. The behavior is same.This problem is very critical when bounded properties initial value is null. (Nothing shown when setting value.)
I checked same test on non modal page and seems ok. so the problem looks like modal page specific issue.
The text was updated successfully, but these errors were encountered: