Enable/Disable the field from the formField
Would be nice if i could disable or enable the formField directly from the FormField
If you mean to enable/disable validation for a formField, yea would be nice. For now, you could work around it by adding/removing the form field from the form, and then enabling/disabling the UI element.
You are also welcome to send a PR!
No i mean, being able to directly disable the formField which also disables the view form being able to get edited... let me know what you think about that.
The formfields are meant to be part of the ViewModel, decoupled from the UI. So no, it can't do that sorry
No, you don't seem to understand, i'm not asking that the view coupled with the formField. it's the same way we have error(live-data) etc, we should be able to provide events for other states.
such that within the viewModel i can control the logic of disabling the formField or enabling it, like you said it's meant to be part of the viewmodel.
However the workaround is to provide a boolean field in the viewModel and bind that to the view.
Ok, I understand now and it makes sense. But not sure how soon I can work on it. I would appreciate a pull request if you ever work on it.
I think that with all these states that need to be observed, we can have one generic callback with a tag parameter: enable, disable, requestfocus, etc, at the point of emitting so it is more flexible. Error and feedback can remain separate (or not).
Perfect! makes sense!... I'll see how to work on it and send a PR...