New value null/empty check option [FEATURE REQUEST]
Hi everyone,
it would be handy to have native support in this awesome module for null/not null value check. I made it by myself for example adding in the directive options hash:
ade-text='"... ,"null":false}"
and then in the text_directive.js file, saveEdit function I modify a section:
...
if(exited!=3) { //don't save value on esc
if(options.null == false){
if( input.val() ) {
value = input.val();
controller.$setViewValue(value);
}
} else {
value = input.val();
controller.$setViewValue(value);
}
}
...
Maybe if no change was made, broadcasting is to be considered redundant and not necessary in my opinion.
Ciao, Luca
Are you trying to prevent someone from clearing the text input. Basically forcing a value to exist other than empty string?
Yes. In my case It's an option one can set in order to prevent a null/empty variable/model.
I have scheduled this for version 1.3.
Hooray! ;)
I realize that I dropped the ball on this one. Sorry. I'll try to get it into the next major release.