Hello!
Please look at this.
Dirty and clean values do not work with complexData flag.
Hello,
It’s not a bug, but we’ll consider the improvement of the output for these methods.
Thanks!
And can you give us your use-case for the hierarchical getClean/getDrityValues output? We’re trying to evaluate the significance of this behavior.
Don’t have any.
Was just playing with forms.
Well, in this case, I don’t think we’re going to change the current behavior. The typical scenario is
var changed = $$("form").getDirtyValues();
if (changed["a.b.c"]) do_something();
And with the hierarchical data this won’t look good.
Olga, this might be an issue when default values are used in form fields, like ‘Enter something specific here’. Providing same behavior might look more consistant
Yep, changing the API will make it more consistent, but we prefer a more pragmatic approach.
The getDirtyValues and getCleanValues returns a simple structure, which works better in practical scenarios ( iteration through dirty fields, checking is some field was changed or not, etc. )
when default values are used in form fields
Can you please explain it a bit more ?
Currently, you can use placeholder
attribute to show such kind of message, so it will not affect form values in any way.