-
Notifications
You must be signed in to change notification settings - Fork 49
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
Assigning value to code programatically not working after first time. #18
Comments
@moshe5745 Hi. ok. I will add the fix for that. |
@moshe5745 I have checked the current version of the lib and it works as expected. I have used the latest version
In your code please check that the value is changed during different browser events loop. If the changing will be in the same event loop the last value for the current loop will be used. Also please ensure that you use the latest lib version Example 1 with the same evet loop:
The last value will be shown in the component - Example 2 with the different event loops:
The last value for the latest event of the browser will be shown in the component - |
I downloaded and ran your code and its working properly. |
@moshe5745 I have also checked the lib on the Ionic. Please check the attachment, it is the Ionic project. |
@moshe5745 Have you solved the issue? |
Closing as not reproducible |
If you assigned value for the first time it works.
But the second time its not.
this.code = '1111'; // works
... some code ...
this.code = '2222' // doesn't work
I found a workaround, but still i think its need a fix.
this.code = '1111'; // works
... some code ...
this.code = '2222'
setTimeout(() => this.code = '2222' // works
But this workaround only works if the previous value of code wasn't empty string.
this.code = '1111'; // works
... some code ...
this.code = ''
setTimeout(() => this.code = '2222' // doesn't works
But if we assigned undefined it works
this.code = '1111'; // works
... some code ...
this.code = undefined
setTimeout(() => this.code = '2222' // works
The text was updated successfully, but these errors were encountered: