angular-selector icon indicating copy to clipboard operation
angular-selector copied to clipboard

Custom filter and sorting

Open C00per opened this issue 10 years ago • 3 comments

Hi!

  1. Is it possible to add the custom filter and sorting capability for the array in the "options" parameter?
  2. Could you please explain how current filtering is working? It seems that used all fields for objects in the array in the "options" parameter, so objects without entered symbols are shown.
  3. Is it possible to highlight entered sybmols that used for filtering?

C00per avatar Feb 28 '16 19:02 C00per

Hi @C00per. At the moment filtering works with the native angular $filter service over the entire object. It would be very nice if users could be define a custom filtering function, are you interested in making a PR?

Regarding symbols highlighting, I don't have a solution to perform that action, since every user can define its own template for dropdown items. Maybe it can be done with a filter, but I'm not sure about that.

indrimuska avatar Feb 29 '16 16:02 indrimuska

Hi @indrimuska. I'm sorry, but I'm not enough qualified to make a PR (.

Custom filtering and sorting are useful features that allow use selector with complex objects. For now, I have to create the special array with simplified copies as a workaround.

But anyway angular-selector works as expected so I'm trying to migrate to it from buggy ui-selector.

C00per avatar Mar 01 '16 08:03 C00per

Ok, maybe custom filtering function could be one of the next features :)

indrimuska avatar Mar 01 '16 22:03 indrimuska