Skip to content
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

If the value of a binding changes to -1, it is not displayed in a Label #5559

Closed
shiv19 opened this issue Mar 18, 2018 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@shiv19
Copy link
Member

shiv19 commented Mar 18, 2018

[textProperty.setNative](value: string | number) {

<Label text="{{ value }}" />

If we have a label like this, and the value of the value variable changes to -1 then it doesn't display on the label. Unless it is stringified.

https://play.nativescript.org/?template=play-js&id=2XPVRh

(same on iOS)

@tsonevn tsonevn self-assigned this Mar 19, 2018
@tsonevn tsonevn added the bug label Mar 19, 2018
@tsonevn
Copy link
Contributor

tsonevn commented Mar 19, 2018

Hi @shiv19,
Thank you for contacting us,
I reviewed your case and was able to recreate this issue. You could keep track on it for further info.

@vakrilov vakrilov added this to the 4.0 milestone Mar 21, 2018
vakrilov pushed a commit that referenced this issue Mar 21, 2018
* fix(android/text ios/text): allow -1 to be a valid binding value

Instead of using -1 as special value, use Symbol(-1)
so that it can't be reset accidentally

Closes issue #5559

* renamed the symbol
@vakrilov vakrilov added done and removed in progress labels Mar 23, 2018
@ghost ghost removed the bug label Mar 23, 2018
@lock
Copy link

lock bot commented Aug 27, 2019

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.

@lock lock bot locked and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants