ionic-filter-bar
ionic-filter-bar copied to clipboard
Choose placeholder text in service options and not only in config
I am using angular-translate, my Ionic app can change languages while running. I need to change placeholder text dynamically. Cancel text I can change without problem in service options, please add placeholder too...
100% agreed
If you need a temporary "fix". I've done it like this:
$ionicFilterBar.show({
items: $scope.items,
// The fix is here
done: function() {
var input = document.querySelector("ion-filter-bar input.filter-bar-search");
if (input) {
angular.element(input).attr("placeholder", "my i18n search placeholder");
}
},
//
update: function(filteredItems, filterText) {
// do some things
},
expression: function (filterText, value, index, array) {
// do some things
},
cancelText: "my i18n cancel text"
});
@donaldinou it works!