diff --git a/README.md b/README.md
index fa06c0f..3eb7e9a 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ Run the following ommands:
npm install
bower install
gulp
-
+
## Setup
#### Install
@@ -49,7 +49,7 @@ Keyboard in your module's run section.
#### JS/CSS Imports (index.html)
Include the following JavaScript/CSS file imports in your index.html. Remember to import the ionic libraries first!
The example below assumes your 3rd party bower dependencies are located in the default bower_components folder.
-
+
@@ -155,7 +155,7 @@ A service you can inject in your controller to show the filter bar
@param {object} options The options for the filterBar. Properties:
-
+
- `[Object]` `items`
The array of items to filter. When the filterBar is cancelled or removed, the original list of items will
@@ -165,7 +165,7 @@ A service you can inject in your controller to show the filter bar
- `{function=}` `update`
Called after the items are filtered. The new filtered items will be passed to this function which can be used
- to update the items on your controller's scope. The text string that was searched on will be passed as the
+ to update the items on your controller's scope. The text string that was searched on will be passed as the
second argument.
@@ -194,32 +194,32 @@ A service you can inject in your controller to show the filter bar
- `{function=}` `expression`
- The predicate to be used for selecting items from the `items` array. This is similar to the angular filter
- `expression` function described [here](https://docs.angularjs.org/api/ng/filter/filter), except that the first
+ The predicate to be used for selecting items from the `items` array. This is similar to the angular filter
+ `expression` function described [here](https://docs.angularjs.org/api/ng/filter/filter), except that the first
argument will be the filterText as shown below. Default value is `null`.
NOTE: This property will take precedence over `filterProperties`. Only one can be defined.
-
+
function (filterText, value, index, array) {
return value.propertyName === filterText || value.anotherPropertyName === filterText;
}
- `{function,true,false,undefined=}` `comparator`
- Determines if the expected value (from the filter expression) and actual value (from the object in the array)
- 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).
+ Determines if the expected value (from the filter expression) and actual value (from the object in the array)
+ 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]` `filterProperties`
A string or string array of object properties that will be used to create a filterExpression object for
- filtering items in the array. All properties will be matched against the input filter text. For example, given
+ filtering items in the array. All properties will be matched against the input filter text. For example, given
the following object in an array of items , and assume the user searches for "fish"
-
+
{name: 'fish', description: 'fish', color: 'blue'}
-
+
filterProperties: ['name', 'description'] ... The object will be matched and passed to the array in `update`
filterProperties: ['name', 'color'] ... The object will NOT be matched or passed to the array in `update`
-
+
NOTE: If `expression` is defined, `filterProperties` will have no effect. Only one can be defined. Default
value is null.
@@ -252,6 +252,11 @@ A service you can inject in your controller to show the filter bar
- `.modal` (Appends to a modal)
- `.menu-content` (Appends to the content section of a side menu. Useful when the expose-aside-when attr is set.)
+ - `{boolean=}` `focusOnShow`
+
+ Whether to focus the search input on filterBar show. If false, backdrop will be hidden. Default value is true.
+
+
## Screenshots
diff --git a/dist/ionic.filter.bar.js b/dist/ionic.filter.bar.js
index 9d39717..73fea4b 100644
--- a/dist/ionic.filter.bar.js
+++ b/dist/ionic.filter.bar.js
@@ -61,7 +61,7 @@ angular.module('jett.ionic.filter.bar', ['ionic']);
cancelEl.bind('click', cancelFilterBar);
// If backdrop is enabled, create and append it to filter, then add click/swipe listeners to cancel filter
- if ($scope.config.backdrop) {
+ if ($scope.config.backdrop && $scope.focusOnShow) {
backdrop = angular.element('