How to avoid infinite loop of change events
See original GitHub issueIf you have custom config options and add a listener to change
events on a flatpickr field, it enters an infinite loop. I can’t figure out why or the best way to avoid or compensate for it. The most basic configuration with no options doesn’t seem to do it, but I want to use some options while triggering events based on the value of the field changing. How can I do this?
Reproduction of the problem: https://jsfiddle.net/y890pmzu/
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
How to stop infinite looping by limiting the number of trigger ...
How do you limit the number of trigger executions to stop infinite looping during Change Request Transition in Telelogic Change?
Read more >How can one solve the infinite loop of change events?
EnableEvents = True . This prevents Excel from firing events (like Worksheet_Change) while your code is running.
Read more >JQuery infinite loops on change event – how to prevent
This can be solved by saving a flag in localStorage. sessionStorage would work fine too, or any others like localdb, etc.
Read more >How to Avoid Infinite Loops - Disable Events in Excel VBA
Free Workbooks: https://www.excelvbaisfun.com/links?utm_source=youtube&utm_medium=desc&utm_content=Wf7ci_obxaM Join Excel Ninja Pro: ...
Read more >The Curious Case of Angular and the Infinite Change Event ...
Installation ; Install the Angular CLI globally. npm install -g @angular/cli ; Create a new Angular project. ng new infinite-loop --interactive= ...
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 Free
Top 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
https://stackblitz.com/edit/flatpickr-with-alert-gffekn?file=index.js
Including the
allowInput: true
option makes it an infinite loop.For me I just hooked into the onClose function rather than the onChange