Question | NgxFormPluginModules ui states
Could you please add that touched and untouched states to the Form plugin?
Also, an {option: {}} for us to add any other ui state necessary. For instance, I currently add a target UI state that identifies different instances of the same form. This target is an @Input() target property. I use this target to switch the instance of the form being currently used,
Given, the example at https://ngxs.gitbooks.io/ngxs/plugins/form.html, this will have to be done for each form. So, each form will be a 1:1 mapping to its own store. Is this correct?
Let me know what you think. If there is an easier way to do this from my end that would be appreciated.
Cheers
@amcdnl we can probably add a userData property in the state and create a corresponding action.
I'm open to suggestions!
We have two sources of truth.
I can enable/disable the whole form assigning mystate.myform.disabled
When I need to enable/disable individual controls, I have to get FormGroup reference and work on it imperatively. While we have dirty/disabled for the group in model, all the individual contolls can be modified impertively using FormGroup instance
@tsawan - Anymore thoughts?
@amcdnl I think it will be complicated to support enable/disable for individual form fields through store. If you believe it adds a lot of value, then let's consider it.
I feel like that is getting a bit too deep into what could be controlled through the form itself. I don't think that that is a state management concern.
By @markwhitfeld (in Slack DM)