-
Notifications
You must be signed in to change notification settings - Fork 10.3k
How to create a component of InputText to use in EditForm #8386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It won’t update because this code doesn’t trigger ValueChanged anywhere. |
Hi @medeirosraul - what Steve said is right, this won't send change notifications because in It's really our intended pattern for you to subclass If you want a solution to wrap an RazorInputTest.razor
Index.razor won't have to change. |
This works, thank you. |
@rynowak What about the input type of password, do we fall back to the standard html input? |
@pjmagee Consider inheriting from InputBase directly, e.g.:
|
Hello, the following worked for me: <InputText @bind-Value="@value" class="form-control" /> @code { use: <CustomTextbox @bind-Value="@user.Title" /> |
Cenario
I'm trying to make a component that uses InputText, but when I edit the textbox, it doesn't update the EditForm Model. This is how i'm trying to do this:
RazorInputTest.razor
Index.razor
When I edit the input, the span with the "Name of the category" doesn't update, but I don't know what I am doing wrong.
Objective
I'm doing a set of bootstrap formated components and this is an important part of this project: preformated input-boxes. I want to create components that binds viewmodels, like InputText does inside the EditForm, but InputText inside a component, inside a EditForm inside another component.
The text was updated successfully, but these errors were encountered: