Skip to content

Adding timeout at fsItemSelected dispatch#7

Closed
marcosrjjunior wants to merge 1 commit into
firework:masterfrom
marcosrjjunior:adding_timeout_at_itemselected_dispatch
Closed

Adding timeout at fsItemSelected dispatch#7
marcosrjjunior wants to merge 1 commit into
firework:masterfrom
marcosrjjunior:adding_timeout_at_itemselected_dispatch

Conversation

@marcosrjjunior
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread fire-select.js
if (! this.isPopulating) {
setTimeout(function() {
this.$dispatch('fsItemSelected', Vue.util.extend({}, item));
}.bind(this), 400);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why setTimeout 400? if you want this to be propagated after DOM is updated, you should use Vue.nextTick, right?

@marcosrjjunior
Copy link
Copy Markdown
Contributor Author

It isn't because of DOM, it is because of these events fsItemSelected, fsItemDeselect.
Sometimes the fsItemSelected it runs before fsItemDeselect.

@wesleyhf
Copy link
Copy Markdown
Member

We have to create an fsItemUpdated event for this.

@wesleyhf wesleyhf mentioned this pull request Mar 16, 2016
3 tasks
@wesleyhf wesleyhf closed this Mar 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants