angular-selectize icon indicating copy to clipboard operation
angular-selectize copied to clipboard

Bindable Placeholder

Open gottfrois opened this issue 10 years ago • 1 comments

When setting a placeholder as a string, everything work as expected but when setting a placeholder using a scoped variable, the placeholder is evaluated for the select DOM element but not for the input DOM element. Please see the demo on the single select scenario here http://plnkr.co/edit/QZTxGG?p=preview

Output here http://d.pr/i/aoc8

gottfrois avatar Feb 27 '15 13:02 gottfrois

+1 I have an object tracking the state of the combo box (loading, loaded, empty, disabled...) and exposing a message for each state. It would be nice it I could just bind to the message field of this object. Meanwhile, I just get the instance of Selectize and update the placeholder manually. The way to do it isn't really documented (kind of using internal API), so I give it here for the record:

            updatePlaceholder: function(placeholder)
            {
                this.selectizeControl.settings.placeholder = placeholder;
                this.selectizeControl.updatePlaceholder();
            },

PhiLhoSoft avatar Jul 10 '15 08:07 PhiLhoSoft