The current implementation of remoteFilter means that users who type reasonably* quickly will have to wait for longer than necessary for the At.js dropdown to render. This is because all substrings of the query must be searched for.

For example, assuming the flag is set to the default of @, say a user types "@david.hughes" into field with an active At.js listener named 'users'. With the current implementation of remoteFilter, the user will need to wait for calls to the following endpoints to finish:

  • ?q=atjs/ajax/users/d
  • ?q=atjs/ajax/users/da
  • ?q=atjs/ajax/users/dav
  • ?q=atjs/ajax/users/davi
  • ?q=atjs/ajax/users/david
  • ?q=atjs/ajax/users/david.
  • ?q=atjs/ajax/users/david.h
  • ?q=atjs/ajax/users/david.hu
  • ?q=atjs/ajax/users/david.hug
  • ?q=atjs/ajax/users/david.hugh
  • ?q=atjs/ajax/users/david.hughe
  • ?q=atjs/ajax/users/david.hughes

A wait time should be established so that the remoteFilter waits, for example, 200ms for further keystrokes. If no keystrokes happen in this time, the endpoint is called with the current query.

Currently pretty busy with other client needs but thought I'd raise this to see if anyone would be up for this :)

*definition of "reasonably" may vary.

Comments

david.hughes created an issue.