angular-selectize
angular-selectize copied to clipboard
Angular selectize directive - I can't type in input when I select empty option
I use angular selectize with these options:
$rootScope.mySelectize = {
allowEmptyOption: true,
valueField: 'id',
labelField: 'label',
searchField: ['label'],
maxItems: 1
};
and in view:
<selectize
config='mySelectize'
name="country"
options='referenceData.country'
ng-model="vm.searchForm.countryId">
</selectize>
Problem: when I select an option, lets say Germany and after I change it to empty option, I can't type into the input, I must delete this empty option from my keyboard to be able to type again.
Any idea how I can reset/clear this option if the user switch between an option with value and one empty?
Thanks.