Vuelidate: Dirty flag propagation

Created on 5 Feb 2017  路  3Comments  路  Source: vuelidate/vuelidate

Using touch on nested field does not propagate to top level dirty flag unless all nested fields are dirty.

In my opinion, setting dirty on a nested field should set dirty for all parents.

It can be tested on https://monterail.github.io/vuelidate/#sub-data-nesting

form$dirty is true if both nestedA.$dirty and nestedB.$dirty are true.

This is true for flat data too. All fields should be dirty in order the top level dirty flag turns dirty.

All 3 comments

This may be the correct behavior for validate on save scenario so code may depend on this behavior.

That is indeed intended. $touch propagates to children, not the other way around.

This is probably going to be resolved by #84

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pylover picture pylover  路  3Comments

wdews picture wdews  路  4Comments

thibremy picture thibremy  路  4Comments

jfis picture jfis  路  3Comments

Christilut picture Christilut  路  4Comments