Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dist/ionic.filter.bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ angular.module('jett.ionic.filter.bar', ['ionic']);
$scope.showModal();
} else {
$timeout(function () {
$scope.clearFilterText();
$scope.data.filterText = '';
ionic.requestAnimationFrame(function () {
$scope.showBackdrop();
Expand Down Expand Up @@ -425,6 +426,7 @@ angular.module('jett.ionic.filter.bar', ['ionic']);
update: angular.noop,
cancel: angular.noop,
done: angular.noop,
clear: angular.noop,
scrollDelegate: $ionicScrollDelegate,
filter: $filter('filter'),
filterProperties: null,
Expand Down Expand Up @@ -635,6 +637,13 @@ angular.module('jett.ionic.filter.bar', ['ionic']);
}
};

// Called when the filter text is cleared.
scope.clearFilterText = function() {
scope.clear ?
scope.clear() :
angular.noop;
};

// called when the user presses the backdrop, cancel/back button, changes state
scope.cancelFilterBar = function() {
// after the animation is out, call the cancel callback
Expand Down
Loading