Fable.Form icon indicating copy to clipboard operation
Fable.Form copied to clipboard

Rework the APIs which manipulate the form state

Open MangelMaxime opened this issue 1 year ago • 0 comments

ATM to manipulate a Fable.Form.Simple.Form.View.Model state we have the following functions:

  • Form.View.setLoading

But if we want to set the state to Success, Error _ then we need to update the record directly:

{
    model with
        Form.State =
            Form.View.Success "You have been logged in successfully"
},
Cmd.none,

We also have the function Form.View.idle which allows to initial the form state to idle by providing the values.

This feels like something is missing and that we have inconsistencies in how these portion of API is designed.

MangelMaxime avatar Feb 15 '24 17:02 MangelMaxime