diff --git a/README.md b/README.md index 7e1c63b..9c23673 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,11 @@ A service you can inject in your controller to show the filter bar should be considered a match. This is the same as the angular filter `comparator` argument described [here](https://docs.angularjs.org/api/ng/filter/filter). Default value is `undefined`. + - `{string=}` `searchType` + + A string which sets the HTML5 search input type. Examples include search, text, email, tel, number, date, month, password. Full list available [here](http://ionicframework.com/html5-input-types/). + Default value is `search`. + - `[String]` `filterProperties` A string or string array of object properties that will be used to create a filterExpression object for diff --git a/dist/ionic.filter.bar.js b/dist/ionic.filter.bar.js index b7e9e87..c8b72e8 100644 --- a/dist/ionic.filter.bar.js +++ b/dist/ionic.filter.bar.js @@ -17,7 +17,7 @@ angular.module('jett.ionic.filter.bar', ['ionic']); '
' + '' + '' + '
' + @@ -28,7 +28,7 @@ angular.module('jett.ionic.filter.bar', ['ionic']); '
' + '' + '' + @@ -438,7 +438,8 @@ angular.module('jett.ionic.filter.bar', ['ionic']); favoritesTitle: 'Favorite Searches', favoritesAddPlaceholder: 'Add a search term', favoritesEnabled: false, - favoritesKey: 'ionic_filter_bar_favorites' + favoritesKey: 'ionic_filter_bar_favorites', + searchType: 'search' }, opts); scope.data = {filterText: ''}; @@ -535,7 +536,7 @@ angular.module('jett.ionic.filter.bar', ['ionic']); // pass back original list if filterText is empty. // Otherwise filter by expression, supplied properties, or filterText. - if (!filterText.length) { + if (!(filterText.toString().length)) { filteredItems = scope.items; } else { if (scope.expression) {