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

AutoNumeric integration in a Blazor solution #786

Open
robertosalemi opened this issue Apr 18, 2024 · 1 comment
Open

AutoNumeric integration in a Blazor solution #786

robertosalemi opened this issue Apr 18, 2024 · 1 comment

Comments

@robertosalemi
Copy link

HI,
I used AutoNumeric in an asp.net MVC solution, but nowI would like to integrate it into a Blazor solution.

But I'm seeing some unexpected behavior:

  1. with Blazor I can exploit the binding to objects, this is how I defined my input:
    <input type="text" @bind="@myObject.myProperty" id="myInputId" />

The myObject object is updated via code behind in C#.

When first initialized myObject.myProperty has a value e.g. 1234 which is displayed correctly, but this is at the same time set as value.
In HTML page I can see:
<input type="text" id="myInputId" value="123,4">

When I update the value of myObject.myProperty again, the user sees the new value (e.g. 4567), but the input value still has the old value (123.4).
When the user mouseovers the input text, the value 4567 is replaced by the old 123.4.

How come?
Do I have to set something in the autonumeric options?

Thank you.

@AlexandreBonneau
Copy link
Member

Hello @robertosalemi, I do not know exactly how Blazor works, but if it's managing data-binding, maybe take a look at how this was done with the Vue and Angular AutoNumeric components?

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

2 participants