angular-selectize
angular-selectize copied to clipboard
Bindable Placeholder
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
+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();
},