question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: angular framework bindings, events emitted twice

See original GitHub issue

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

Starting with 6.0.0-beta-7 and including 6.0.0-rc.0, ion-datetime double emits to ionChange after selecting a new date and then tapping Done button.

Expected Behavior

Using 6.0.0-beta-6 ionChange emitted a single event in ion-datetime after selecting a new value and tapping Done button.

Steps to Reproduce

<ion-datetime displayFormat="MMMM DD, YYYY" max="2030-12-31" (ionCancel)="openCalendar = false" (ionChange)="dateSelected($event)" mode="ios" presentation="date" showDefaultButtons="true" size="fixed" showDefaultTitle="true" #ionDatetime class="date-time"> <div slot="title">Select Date</div> </ion-datetime>

Select new date and then tap Done button.

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.17.1

Utility:

cordova-res : not installed globally native-run : 1.4.1

System:

NodeJS : v14.15.1 npm : 7.20.5 OS : macOS Big Sur

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
liamdebeasicommented, Oct 13, 2021

Hi everyone,

This issue impacts all Ionic components that emit events. We will have a fix for this issue soon.

3reactions
liamdebeasicommented, Oct 11, 2021

Thanks! We updated our Angular wrappers in beta 7 to use https://github.com/ionic-team/stencil-ds-output-targets, but it looks like there is an issue that causes events to be emitted twice.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular RxJS: event emitted twice - typescript - Stack Overflow
You subscribe to the observable metrics$ two times. Here is what happens: You subscribe by using *ngIf="!(metrics$ | async)" .
Read more >
bug(angular-output-target): events fire twice · Issue #81 - GitHub
This is happening with both Angular 9 and Angular 10, and renders the output completely unusable. Is there any real work around for...
Read more >
New event renders twice - DayPilot Forums
So I am working with the new Angular 2 daypilot in Typescript, and I have a bug that seems to come and go...
Read more >
Two-way binding - Angular
These two methods use resize() to change the value of the size property within min/max value constraints, and to emit an event that...
Read more >
[Solved]-Angular RxJS: event emitted twice-rx.js
[Solved]-Angular RxJS: event emitted twice-rx.js · You subscribe by using *ngIf="!(metrics$ | async)" . · When you click search, it immediately fires the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found