Blazor TextInput -> How to get a @ref to it

<TextInput TValue="string" @ref=r Label="Diameter" @bind-Value=v></TextInput>
TextInput<string>? r;

throws the following error:

 Unhandled exception rendering component: The JSON property name for 'ServiceStack.Blazor.Components.Tailwind.TextInput`1[System.String].Class' collides with another property.

How do we get a reference to the TextInput? I need it to invoke something in javascript and prefer not to have to define id’s.

I can’t reproduce the problem you are seeing, are you able to share the full stack trace of the error as well as more context around the code you are using? If you get create a minimal reproduction, I can help look into the root cause of the problem you are seeing. Thanks.

1 Like