jquery-autocomplete icon indicating copy to clipboard operation
jquery-autocomplete copied to clipboard

FilterResults works better than filter. Filter inserts a superfluous <li>

Open ManOrMonster opened this issue 11 years ago • 0 comments

I'm using autocomplete to pull back a list of user names from AD. The user names contain underscores ([email protected]). However, I want users to be able to simply type a name and have the code do the rest, for ease of use. So a user should be able to type "Bruce Campbell" instead of "[email protected]". To achieve this I use a replace function to replace \s with _, so clearly I need to turn off the filter to display the list.

Using filter: false, it returns a list of users just fine, but the first

  • in the dropdown list is blank. This is a problem, especially considering I'm using selectFirst: true. However, if I use the deprecated filterResults: true, this first empty cell does not appear. As it is, filterResults works better for my purposes.
  • ManOrMonster avatar Dec 12 '13 22:12 ManOrMonster