Closed bdlawrence13 closed 3 years ago
Sorry, not all the code came through. Had to remove the HTML tags, as this form wanted to treat them as HTML, not text.
EditForm Model="@ROObject" OnValidSubmit="@HandleValidSubmit" Serial #: InputText @bind-Value="@ROObject.rentalOrder.sn"
POHD (No = Has POHD, Yes = Needs POHD):
InputCheckbox @bind-Value="@ROObject.rentalOrder.pohd"
Service Center:
InputText @bind-Value="@ROObject.rentalOrder.svcCentre" size="50" @onchange="getROPs"
button class="btn btn-primary" type="submit">Submit
end EditForm
Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project (ideally a GitHub repo) that illustrates the problem.
Found a work around. No longer an issue.
Have tried to work through this, but believe something isn't working as it should.
I have a Blazor EditForm (code below) where I read the model object in to pre-populate. The form's function is to edit values read from the database. However, when I change the value in a text input or any other input, then go to the next field, the previous field reverts back to the previous value. I cannot get the value to change.
Here's the relevant code:
In the above, let's say Serial Number = "12345", POHD is unchecked and Service Center = "Phoenix". If I change "12345" in Serial number to "434343" then go to Service Center, the value changes back in Serial Number to "12345" If I check POHD, then to go Service Center, POHD is unchecked.
I can't find anything in the documentation. This isn't the behavior if I use input type="text"... If I use the same form, only don't initialize the object - adding new values to a blank object, this works fine. What Blazor seems to not allow me to do is edit values.
Also, using the onchange="getROPs" in service center - this is never called within the InputText call.
Appears to be a problem with how either the input controls, the EditForm or the binding is working.