Skip to content
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

Initial stab at future Ajax support #5847

Open
wants to merge 1 commit into
base: v1-dev
Choose a base branch
from

Conversation

melvyn-sopacua
Copy link

Proposed changes

Add a callback hook just before data is consulted, leveraging
the logic that is already there (irrelevant keys, minlength, etc).

This needs more work to deal with requests that typically take longer
than the time it takes for a user to type multiple keys, but the API
for the callback is very unlikely to change as all that logic can
be encapsulated in the callback itself.

I'm not well-versed in JS unit tests, but will add them if the proposed
implementation is accepted.

Contributes to #4086 .

Screenshots (if appropriate) or codepen:

A (working) AJAX implementation is in this branch.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Add a callback hook just before data is consulted, leveraging
the logic that is already there (irrelevant keys, minlength, etc).

This needs more work to deal with requests typically longer
the time it takes for a user to type multiple keys, but the API
for the callback is very unlikely to change as all that logic can
be encapsulated in the callback.
@jpic
Copy link
Contributor

jpic commented May 17, 2018

The API looks good but I have a question: should we trigger this instantly or should we defer like 100ms to give the user a chance to type another character before firing the event ?

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.

None yet

2 participants