Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
By-passing $dirty check
Message
De
01/04/2015 14:31:27
 
 
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01609780
Message ID:
01617660
Vues:
14
>>>>Think that may be overkill - you'll be setting form to pristine even if other inputs are dirty.
>>>>
>>>>>I think I got it to work, but I am continuing tests now. Here is my current code for the directive, let me know if you see problems:
>>>>>
>>>
>>>Do you think saving current form's state in focus event is not going to work? Do you see my variable for saving current form's state?
>>Quick reply so I may have missed something but if the form is NOT dirty there's no point in setting it to pristine. And, as before, if it IS dirty then that may be because an input other than the one you are interested in is dirty......
>>
>So, in the focus event we save current form's status. If it's dirty, it means some other control set it dirty, so we will not reset the form. If it's false (e.g. form was in pristine state), then we need to reset it.
>
>That's my current logic.

OK. Missed that - sounds OK....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform