Skip to content

Angular selectize directive - I can't type in input when I select empty option #170

@valikonen

Description

@valikonen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions