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

Autocomplete doesn't work as expected #94

Open
iankressin opened this issue May 28, 2020 · 1 comment
Open

Autocomplete doesn't work as expected #94

iankressin opened this issue May 28, 2020 · 1 comment

Comments

@iankressin
Copy link

iankressin commented May 28, 2020

Description

Filling the input through the browsers autocomplete doesn't update the model, neither fires the ngModelChange event. Whereas the change event is called but the input value is malformatted.

Example

html

<input   currencyMask
              [(ngModel)]="amount"
              [options]="{prefix: 'R$ '}"
              name="amount"
              placeholder="R$ 0,00"
              (change)="changeEvent($event)"
              (ngModelChange)="modelChangeEvent()">

.ts

changeEvent($event) {
    // Absolute value picked from the autocomplete
   // e.g. 10, while if 10 is typed, gives the value 0.10
    console.log($event.target.value);
}

// Never called for autocomplete
modelChangeEvent() {
    ...
}

Screenshot from 2020-05-28 11-53-29
Screenshot from 2020-05-28 12-41-39

Expected

To autocomplete input update the model with the formatted value

Versions

"ngx-currency": "^2.0.0"
Firefox: 76.0.1
Chrome: 81.0.4044.138
OS: Ubuntu 20.04 LTS

@jlusong15
Copy link

Any solutions for this bug? @nbfontana

We are encountering this problem as well, and auto-fill is an important functionality for us. Hoping for a fix.

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