ionic-filter-bar icon indicating copy to clipboard operation
ionic-filter-bar copied to clipboard

Choose placeholder text in service options and not only in config

Open MatanYadaev opened this issue 9 years ago • 2 comments

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...

MatanYadaev avatar Jan 22 '16 18:01 MatanYadaev

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 avatar Apr 27 '16 08:04 donaldinou

@donaldinou it works!

yanmagale avatar Aug 23 '16 19:08 yanmagale