Closed syedautherabbas closed 8 years ago
In version 1, filtering was performed inside the plugin's logic; that setting would make sense then. Starting in version 2, filtering is delegated to whatever filtering mechanism the coder chooses (filter
or your own filtering function).
Using filter
:
<div custom-select="f for f in fruits | filter: $searchTerm" ng-model="fruit"></div>
Using a function:
<div custom-select="p as p.name for p in findPeople($searchTerm)" ng-model="people"></div>
I believe the developer should be given a choice between the final search reg-exp , whether it can be "contains with" or "starts with"