vue2-selectize
vue2-selectize copied to clipboard
How to call method updatePlaceholder?
How to call updatePlaceholder
(or any method) described in the selectize.js API?
One example:
<selectize v-model="items" :settings="itemsSettings" ref="selectItems">
<option v-for="option in items" :value="option.value">{{ option.text}}</option>
</selectize>
itemsSettings
is {placeholder: 'Loading...'}
;
I'm loading the options in an AJAX request and I'd like to update the placeholder after the request concludes. I'm updating the placeholder, this.itemsSettings.placeholder = 'Select an item'
and it doesn't react to the component. Selectize's API has a method to update the placeholder; I just can't call it. I tried this.$refs.selectItems.$el.selectize.updatePlaceholder();
to no effect (also no error thrown).
Thank you.