John Cowen 4743ab045e ui: Upstream Instance Search and Sort (#9172)
* ui: Add predicate, comparator and necessary files for the search/sort

* Implement search and sort for upstream instance list

* ui: Tweak CSS so its all part of the component

* Remove the old proxy test attribute
2020-11-13 10:27:19 +00:00

13 lines
309 B
JavaScript

export default () => term => item => {
const lowerTerm = term.toLowerCase();
return Object.entries(item)
.filter(([key, value]) => key !== 'DestinationType')
.some(
([key, value]) =>
value
.toString()
.toLowerCase()
.indexOf(lowerTerm) !== -1
);
};