New issue

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

Cancel the ajax request #257

tsamaya opened this Issue Nov 15, 2016 · 2 comments


None yet
2 participants

tsamaya commented Nov 15, 2016

I did not found an out of the box function to Cancel the ajax request if I know the query will not return any result.
As a workaround : in the ajax function I returned false. That's tigger an internal error but does the job.

ajax: function(query) {
var m = theRegex.exec(query);
if(m !== null) {
   // return the correct ajax json Object to make the ajax request
} else {
  // workaround to cancel request:
  // fire a internal error but prevent ajax request
  // and no error logged in console
  return false;

so it is not an issue but more a question.

running-coder added a commit that referenced this issue Nov 21, 2016


This comment has been minimized.


running-coder commented Nov 21, 2016

Hey Arnaud, I've fixed the condition to allow you to return false or object from an Ajax function. If a group returns false the other ones will still be generated. You shouldn't see a javascript error in the console anymore. Let me know if this helps.


This comment has been minimized.

tsamaya commented Nov 25, 2016

That's great stuff !
thank you for your work

running-coder added a commit that referenced this issue Nov 30, 2016

Version 2.7.3
- #251 Javascript error when using `correlativeTemplate` and a template function
- #256 Add clear function `resetInput` for Typeahead input
- #257 Allow to cancel the Ajax request before it's sent
- #261 Module export function call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment