Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose placeholder text in service options and not only in config #68

Open
MatanYadaev opened this issue Jan 22, 2016 · 2 comments
Open

Comments

@MatanYadaev
Copy link

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

@donaldinou
Copy link

donaldinou commented Apr 27, 2016

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"
});

@yanmagale
Copy link

@donaldinou it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants