function _filterItems(sTextToFilter, aItems, vTextGetter) {
		sTextToFilter = sTextToFilter && sTextToFilter.toLowerCase();

		if (!Array.isArray(aItems)) {
			return [];
		}

		return aItems
			// Extracts texts from the items
			.map(function (oItem) {
				return [oItem, _extractTextsFromItem(oItem, vTextGetter)];
			})
			// Filters only the matching items by the serach term criteria.
			.filter(function (aItemMeta) {
				var oItem = aItemMeta[0],
					aItemTexts = aItemMeta[1];

				if (!oItem || oItem.isA("sap.ui.core.SeparatorItem") || oItem.isA("sap.m.GroupHeaderListItem") || (oItem.isA("sap.m.ColumnListItem") && !oItem.getVisible())) {
					return false;
				}

				return aItemTexts.some(function (sText) {
					return _startsWithIgnoreCase(sText, sTextToFilter);
				});
			})
			// Normalize the output result
			.map(function (aItemMeta) { return aItemMeta[0]; });
	}
/**
	 * Filters items based on an input string.
	 * A custom getter string could be provided to support further scenarios. The default one is <code>getText</code>.
	 *
	 * @param sTextToFilter {string}
	 * @param aItems {array<T>}
	 * @param vTextGetter {string|function}
	 * @returns {array<T>}
	 * @private
	 */
Filters items based on an input string.
A custom getter string could be provided to support further scenarios. The default one is getText.


Filters items based on an input string . A custom getter string could be provided to support further scenarios . The default one is getText .
function _filterItems(sTextToFilter, aItems, vTextGetter) {
		sTextToFilter = sTextToFilter && sTextToFilter.toLowerCase();
		if (!Array.isArray(aItems)) {
			return [];
		}
		return aItems
			.map(function (oItem) {
				return [oItem, _extractTextsFromItem(oItem, vTextGetter)];
			})
			.filter(function (aItemMeta) {
				var oItem = aItemMeta[0],
					aItemTexts = aItemMeta[1];
				if (!oItem || oItem.isA("sap.ui.core.SeparatorItem") || oItem.isA("sap.m.GroupHeaderListItem") || (oItem.isA("sap.m.ColumnListItem") && !oItem.getVisible())) {
					return false;
				}
				return aItemTexts.some(function (sText) {
					return _startsWithIgnoreCase(sText, sTextToFilter);
				});
			})
			.map(function (aItemMeta) { return aItemMeta[0]; });
	}
function _filterItems ( sTextToFilter , aItems , vTextGetter ) { sTextToFilter = sTextToFilter && sTextToFilter . toLowerCase ( ) ; if ( ! Array . isArray ( aItems ) ) { return [ ] ; } return aItems . map ( function ( oItem ) { return [ oItem , _extractTextsFromItem ( oItem , vTextGetter ) ] ; } ) . filter ( function ( aItemMeta ) { var oItem = aItemMeta [ 0 ] , aItemTexts = aItemMeta [ 1 ] ; if ( ! oItem || oItem . isA ( "sap.ui.core.SeparatorItem" ) || oItem . isA ( "sap.m.GroupHeaderListItem" ) || ( oItem . isA ( "sap.m.ColumnListItem" ) && ! oItem . getVisible ( ) ) ) { return false ; } return aItemTexts . some ( function ( sText ) { return _startsWithIgnoreCase ( sText , sTextToFilter ) ; } ) ; } ) . map ( function ( aItemMeta ) { return aItemMeta [ 0 ] ; } ) ; }
Filters items based on an input string.
Filters items based on an input string .
// Extracts texts from the items // Filters only the matching items by the serach term criteria. // Normalize the output result