Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Stop continuous ajax requests in select2 #351

Merged
merged 1 commit into from
Apr 19, 2017

Conversation

mohdsayed
Copy link
Contributor

Issue: When we type to select a post in post-select-lookup select2 input , it sends continuous ajax requests for each letter we type without any delay. Ideally the previous request should cancel each time a new request is sent and there should be at least some delay. This PR fixes that issue.

Example of Issue:
select2-issue

@mohdsayed mohdsayed requested a review from westonruter April 19, 2017 06:41
@@ -69,7 +69,10 @@
});
request.done( success );
request.fail( failure );
}

return request;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

select2 already handles aborting the request for us if we return request in transport method.

Copy link
Contributor

Choose a reason for hiding this comment

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

Excellent

@westonruter westonruter added this to the Next Minor Release milestone Apr 19, 2017
@westonruter westonruter merged commit e43f9e8 into develop Apr 19, 2017
@westonruter westonruter deleted the bugfix/select2-continuous-ajax-requests branch April 19, 2017 06:44
@westonruter westonruter modified the milestones: Next Minor Release, 0.8.6 Jun 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants