Skip to content
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

InputNumber: unable to invoke event-callback "OnChange" #3849

Open
Abin-Liu opened this issue May 7, 2024 · 4 comments
Open

InputNumber: unable to invoke event-callback "OnChange" #3849

Abin-Liu opened this issue May 7, 2024 · 4 comments

Comments

@Abin-Liu
Copy link
Contributor

Abin-Liu commented May 7, 2024

Describe the bug

I'm using the InputNumber component in a project and want to be notified when the user changed its value, I tried to use the OnChange event-callback and got no luck.

Here's the demo code:
code

This is the error:
error

I also tried to use "ValueChanged" got same error, and there seems no other events can serve this purpose.

@ElderJames
Copy link
Member

Thanks for contacting us @Abin-Liu , please specific the TValue="int"

@Abin-Liu
Copy link
Contributor Author

Abin-Liu commented May 7, 2024

Thanks for contacting us @Abin-Liu , please specific the TValue="int"

Did that already, no luck.

@Abin-Liu
Copy link
Contributor Author

Abin-Liu commented May 7, 2024

Thanks for contacting us @Abin-Liu , please specific the TValue="int"

Oops, I must missed something before, I specified TValue as you said and it worked this time, so it's my bad, sorry about the trouble.

@GoldSucc
Copy link

@Abin-Liu by the way, I see you use @bind-Value="@MyValue". please check official blazor docs, you should use @bind-Value="MyValue" without second @. I would recommend this article - https://learn.microsoft.com/en-us/aspnet/core/blazor/components/data-binding?view=aspnetcore-8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants