bug: The ionChange event of ion-input is triggered the second time the page is entered
See original GitHub issueBug Report
Ionic version:
[x] 4.x
Current behavior:
<ion-input [(ngModel)]="tests" (ionChange)="test($event)"></ion-input>
ngOnInit(
this.tests = '123';
)
test($event){
console.log('$event :', $event);
}
This is triggered the second time the page is accessed
Expected behavior:
If the user is not actively typing, no change event needs to be triggered
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Ion-toggle (ionChange) triggered - Ionic Framework
IonChange triggers automatically. Ion-select unnecessarily triggers `ionChange` event when manually update or set value.
Read more >IonInput: IonOnChange event firing twice - Stack Overflow
Current behavior: IonOnChange event for IonInput fires twice when ... and input is empty, then onChange event fires a 2nd time with value...
Read more >Custom event types in Ionic | Damir's Corner
In Ionic 6, component events have well-documented, strongly typed arguments. This should allow them to be used in such event handlers:
Read more >HTML onchange Attribute - W3Schools
Definition and Usage. The onchange attribute fires the moment when the value of the element is changed. Tip: This event is similar to...
Read more >Angular and Ionic Date & Time Lifecycle events Example
The date picker ships with different event hooks for deep customization. Events are triggered through the lifecycle of the component where you ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We were able to get around this issue by using
(ngModelChange)=""
Instead of using(ionChange)=""
Same issue here… april 2021 and counting…