Skip to content
This repository was archived by the owner on Jul 2, 2018. It is now read-only.
This repository was archived by the owner on Jul 2, 2018. It is now read-only.

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

@ManOrMonster

Description

@ManOrMonster

I'm using autocomplete to pull back a list of user names from AD. The user names contain underscores (first_last@domain.gov). 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 "bruce_campbell@domain.gov". 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.

  • Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      No labels
      No labels

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions