However, when I hit a breakpoint inside the OnValidSubmit handler for the EditForm, the "Name" field is null.
If I change back to a standard <InputText> component, the data binding works just fine.
Can anyone help, please?
UPDATE
If I check the EditContext within the OnValidSubmit event callback, the "_fieldStates" sees the value of the "Name" property but its just not reflected in the bound Model.
Member
1 Points
31 Posts
Wrapping InputBase Types and Data Binding
Feb 27, 2020 04:08 PM|kevinwebster83|LINK
I'm trying to wrap derivatives of InputBase components in my own custom component to suit my application.
However, I don't seem to be able to get the data-binding to work with the property values always coming back as null.
So, I have the following code:
InputTextField.razor
Field.razor
And I come to use it inside an EditForm as follows:
However, when I hit a breakpoint inside the OnValidSubmit handler for the EditForm, the "Name" field is null.
If I change back to a standard <InputText> component, the data binding works just fine.
Can anyone help, please?
UPDATE
If I check the EditContext within the OnValidSubmit event callback, the "_fieldStates" sees the value of the "Name" property but its just not reflected in the bound Model.
All-Star
58234 Points
15673 Posts
Re: Wrapping InputBase Types and Data Binding
Feb 27, 2020 06:40 PM|bruce (sqlwork.com)|LINK
you might have more luck in the blazor forum.
Member
1 Points
31 Posts
Re: Wrapping InputBase Types and Data Binding
Feb 28, 2020 10:19 AM|kevinwebster83|LINK
Thanks, have posted over there also.