Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Added errorMessageVisible at updateErrorMsg - #144

Merged
ghiscoding merged 1 commit into
ghiscoding:masterfrom
Gusi:errorMessageVisible
Jan 19, 2017
Merged

ghiscoding merged 1 commit into
ghiscoding:masterfrom
Gusi:errorMessageVisible

Conversation

@Gusi

@Gusi Gusi commented Jan 17, 2017

Copy link
Copy Markdown
Contributor

Boolean variable to allow bootstrap decorator to monitor when the input is showing an error message.
#142

@ghiscoding

Copy link
Copy Markdown
Owner

is there a particular reason why you set it to undefined instead of false when not showing?

@Gusi

Gusi commented Jan 18, 2017

Copy link
Copy Markdown
Contributor Author

I think that setting to undefined is better because as the value is not initialized at the constructor or so, the only possible values are "true" and "undefined". If you set to false, during the object lifecycle the possible values would be "true", "false" and "undefined" (before the updateErrorMsg is called)

But at the end, it is a matter of personal preference :)

@ghiscoding

Copy link
Copy Markdown
Owner

Do you have to do a check if that property exist before looking at the true flag? I mean, do you need to do something like self.ctrl.hasOwnProperty('errorMessageVisible') because looking at the boolean value?

@ghiscoding
ghiscoding merged commit 6359a10 into ghiscoding:master Jan 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants