We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{ data() { return { queryStack: 0 } }, async getData (query) { const { onQueryInput, queryStack } = this.get(); const newQueryStack = queryStack + 1; this.set({ queryStack: newQueryStack }); const prevQueryStack = newQueryStack; this.set({ loading: true }); const results = await onQueryInput(query); const currentQueryStack = this.get().queryStack; if ( prevQueryStack !== currentQueryStack ) { return; } this.set({ queryStack: 0 }); // Do it } }
{ getData: function getData(query) { var _this2 = this; console.log('hello'); var _this$get8 = this.get(), onQueryInput = _this$get8.onQueryInput, queryStack = _this$get8.queryStack; var newQueryStack = queryStack + 1; var prevQueryStack = newQueryStack; this.set({ queryStack: newQueryStack, loading: true }); onQueryInput(query).then(function(results) { var currentQueryStack = _this2.get().queryStack; console.log(currentQueryStack, prevQueryStack); if (prevQueryStack !== currentQueryStack) { return; } _this2.set({ queryStack: 0, loading: false, position: null, isOpened: results.length !== 0, results: results.map(function(result) { return _extends({}, result, { active: false }); }) }); return results; }); } }
The text was updated successfully, but these errors were encountered:
niksy
No branches or pull requests
The text was updated successfully, but these errors were encountered: