Addepar / ember-widgets

https://opensource.addepar.com/ember-widgets/#/ember-widgets/overview
Other
288 stars 75 forks source link

Add `customFilter` option to `select-component` to supply an additional filter on each list item #290

Closed jiayingxu closed 5 years ago

jiayingxu commented 5 years ago

Add overridable customFilter function to select-component to allow an additional filter on each list item to be applied. The default implementation of the customFilter function is to filter out all items that are !isNone(item).

This will enable the extension of select-component to add an additional custom filter to the select list. The select-component already has built-in search capability that narrows the list of content down based on the query entered in the textbox . Building on the pre-existing implementation, a second filter for filteredContent was added. It was discussed whether or not to add functionality to allow a list of filters to be passed into select-component, but ultimately we wanted the implementation to preserve the pre-built in capability of the matcher function.