You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the default value for a form is set there does not appear to be an angular.copy statement.
This means that if the default value is an array or object, it is possible for the underlying default of the form to be changed by user input to the form leading to undesired behaviour.
In my application I combat this by running angular.copy on the schema (which comes from a provider) each time I load a form into the page but this seems a little wasteful. Is there any documentation to clarify how to approach defaults when creating add ons?
The text was updated successfully, but these errors were encountered:
@strets123 this is a known issue #407 and #505 are both going to require this to change which is why I will mark this as a duplicate, but if they don't cover what you are asking please re-open. Regarding the add-on behaviour for defaults, there isn't any specific documentation on that at the moment, we are always open to documentation pull requests, also you can usually get some more in depth info through the Gitter if David is around.
FYI we are in the middle of separating the core application into an es6 framework independant core so that this tool can leverage that while react and other frameworks can do the same which is why progress seems to have slowed.
When the default value for a form is set there does not appear to be an angular.copy statement.
This means that if the default value is an array or object, it is possible for the underlying default of the form to be changed by user input to the form leading to undesired behaviour.
In my application I combat this by running angular.copy on the schema (which comes from a provider) each time I load a form into the page but this seems a little wasteful. Is there any documentation to clarify how to approach defaults when creating add ons?
The text was updated successfully, but these errors were encountered: