Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

[6.0.0] Insane number of events being emitted #53

Closed
nrthbound opened this issue Jan 7, 2018 · 5 comments
Closed

[6.0.0] Insane number of events being emitted #53

nrthbound opened this issue Jan 7, 2018 · 5 comments
Assignees

Comments

@nrthbound
Copy link

This thing is emitting events like crazy. @on-day-create emits 100's of times on page load (multiply this by each instance of Flatpickr on the page), as well as @on-parse-config and @on-ready. This is horrible for performance and it kills the Vue debugger in Chrome.

@ankurk91 ankurk91 self-assigned this Jan 8, 2018
@ankurk91
Copy link
Owner

ankurk91 commented Jan 8, 2018

@tetshi
What about allowing you to choose which events to emit?

There will be a prop called :events, where you can pass array of events.

<flat-pickr v-model="date" :config="options" :events="['onChange']">

So now only on-change event will be emitted.

@ankurk91 ankurk91 changed the title Insane number of events being emitted [6.0.0] Insane number of events being emitted Jan 8, 2018
@ankurk91
Copy link
Owner

ping @tetshi

@nrthbound
Copy link
Author

I agree, that would be a great addition, but I still think that optimizing when these events get emitted in the first place would be helpful. But yes, a prop that takes a list of events would be nice.

@ankurk91
Copy link
Owner

Okay, a new release is coming soon.

@ankurk91
Copy link
Owner

fixed in version v6.1.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants