Open slavafomin opened 8 years ago
Update.
I've added model: 'form'
property to the specific field and it helped.
It looks like expressions properties are updated when model changes and in my case I don't have a model, cause it's just a button. So when I passed form
controller instead of the model
it began to see the changes.
I've tried to put this property on the form type level, e.g. inside of defaultOptions
object, but it's not working that way.
Is there a way to fix this on a global level, i.e. in entire library or at least in form type? Maybe we should implement a property for the form type configuration, e.g. watchFormChanges: true
or something?
Thanks!
Could you please reproduce your issue using issue.angular-formly.com? It will help us determine what exactly the problem is that you're describing and how it could be fixed. Thanks!
Hey @slavafomin, check out this thread to get the idea how to get around your issue https://github.com/formly-js/angular-formly/issues/672
You can define custom watcher on a form
that will evaluate expressionProperties
or if you dont have model, then even better just set watchAllExpressions
on form options to true
and be done with it :)
Hello @kwypchlo , thank you for the suggestion. I will try it in the future, if I will stumble upon this issue again.
Hello!
I have the following form type:
However, when I use it in my application the template option is not updated when the value of
form.modified
property changes.This property is added to the form controller by the angular-input-modified module.
If I replace the expression with the function, I can see that it's not called when the
form.modified
property changes.Do you know what could cause this and how can I make it work? Thank you!