ngx-currency
ngx-currency copied to clipboard
Event (input) dosen't work
Event (input) dosen't work, Im actually use google chrome
<input` type="text" (input)="calculatePrice(rowData)" currencyMask
[options]="{ prefix: ' ', thousands: '.', decimal: ',', max :'1000000' }"
[(ngModel)]="rowData.amount">
Thanks
I am facing this issue too. Chrome Version: Version 81.0.4044.129.
it works with key events though
it works with key events though
You say keypress keyup etc.. ? Is not the same behaviour ..
it works with key events though
You say keypress keyup etc.. ? Is not the same behaviour ..
yes. (keyup), (keydown), (keypress) events work. idk why input/change are not working
@mfabioe Its because of this area:
@HostListener("input", ["$event"])
handleInput(event: any) {
// This Line ------------------
if (this.isChromeAndroid()) {
!this.isReadOnly() && this.inputHandler.handleInput(event);
}
}
On all other events it is if(!this.isChromeAndroid())
But I don't know why that condition is there in first place. If someone can investigate it..
https://github.com/nbfontana/ngx-currency/blob/master/src/currency-mask.directive.ts Line 86
Edit: I think the if (this.isChromeAndroid()) { should be if (!this.isChromeAndroid()) {
I am facing the same issue. Change event doesn't work. Is it because NG_VALUE_ACCESSOR? My input:
<input [options]="{align : 'left', prefix: 'R$ '}"
matInput formControlName="valor" currencyMask required
(change)="test()">
I am facing the same issue. Change event doesn't work. Is it because NG_VALUE_ACCESSOR? My input:
<input [options]="{align : 'left', prefix: 'R$ '}" matInput formControlName="valor" currencyMask required (change)="test()">
yes, indeed change or input doesn't work, first I thought it's angular 10 but it doesn't work in 9 too.
I'm facing the same, did you guys come up with something? (v1.5.2 - yep, I know, outdated)
As far as I've tested here, I could bind change, keypress and keyup, but couldn't keydown neither input.
I was able to get a similar behavior with keypress and blur but, of course, it's not equal to input event, unfortunately.
With the updated version (2.5.2) I could use keyup, keydown, keypress but couldn't use input or change.
The best alternative solution for me was to use keyup.
The best alternative solution for me was to use
keyup.
This is a pretty good alternative, thanks for pointing that out!
Is this bug being solved? This is a very serious problem for componte's life.
I have solved this issue with setter/getter property which binded to ngModel of input. On setter I have handled valuechange event.
I'm facing the same issue in version 3.0.0
is this lib still active?
@Gabiruti The author does not develop new features, but accepts PR, although not quickly https://github.com/nbfontana/ngx-currency/pull/169#issuecomment-1636160301