When starting this project, I used the default behavior for the form elements. The form state does not change until you blur the input field. This is default behavior for Blazor and to be honest worked fine for me back when starting out. 3 years into it I have grown acclimated to web development and my tastes have changed.
I looked into this and spent about a day converting. There are about 70 uses of text controls in our solution currently. That is a lot to test. In the limited scenarios I did test, I spent a lot of time with state and getting the view to properly refresh.
What made me backtrack on this at the moment, however, was that there is a bad change of state currently with some of our validation controls which fire on text input blur (default behavior). We have some validation controls that fire asynchronously and take an indeterminate amount of time along with our synchronous local validation. For some reason, these no longer play well together and considering the risk I am going to revert my changes and get a few important ones from user profile (change username and add email which both work fine now with the new control).
Going forward we'll be mindful of this and make any new form controls update after input and not focus. For v2 (which will most likely be a rewrite with an entire team involved 🤞), we'll have this design decision in mind from the outset.
When starting this project, I used the default behavior for the form elements. The form state does not change until you blur the input field. This is default behavior for Blazor and to be honest worked fine for me back when starting out. 3 years into it I have grown acclimated to web development and my tastes have changed.
I looked into this and spent about a day converting. There are about 70 uses of text controls in our solution currently. That is a lot to test. In the limited scenarios I did test, I spent a lot of time with state and getting the view to properly refresh.
What made me backtrack on this at the moment, however, was that there is a bad change of state currently with some of our validation controls which fire on text input blur (default behavior). We have some validation controls that fire asynchronously and take an indeterminate amount of time along with our synchronous local validation. For some reason, these no longer play well together and considering the risk I am going to revert my changes and get a few important ones from user profile (change username and add email which both work fine now with the new control).
Going forward we'll be mindful of this and make any new form controls update after input and not focus. For v2 (which will most likely be a rewrite with an entire team involved 🤞), we'll have this design decision in mind from the outset.