ADE icon indicating copy to clipboard operation
ADE copied to clipboard

New value null/empty check option [FEATURE REQUEST]

Open lanceschi opened this issue 12 years ago • 5 comments

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

lanceschi avatar Jun 07 '13 10:06 lanceschi

Are you trying to prevent someone from clearing the text input. Basically forcing a value to exist other than empty string?

offsky avatar Jun 07 '13 20:06 offsky

Yes. In my case It's an option one can set in order to prevent a null/empty variable/model.

lanceschi avatar Jun 07 '13 21:06 lanceschi

I have scheduled this for version 1.3.

offsky avatar Jun 11 '13 16:06 offsky

Hooray! ;)

lanceschi avatar Jun 11 '13 18:06 lanceschi

I realize that I dropped the ball on this one. Sorry. I'll try to get it into the next major release.

offsky avatar May 07 '15 20:05 offsky