unable to reset input field -- (input filed is used by plugin selectize)

85 Views Asked by At

This is my html code: this is my input filed where i have declare input type and id.

<div class="col-lg-4 col-sm-6">
   <div class="form-group">
      <div>
         <input id="SkillsAndInterests" class="form-control" type="text" 
                name="SkillsAndInterests" style="width:286px;height:35px;" />
       </div>
    </div>
 </div>

This is my js code :

vm.CommunityMembersAdditionalInfoData.SkillsAndInterests = vm.skillsandinterestarray;
$('#SkillsAndInterests').tagSuggest({
    data: vm.CommunityMembersAdditionalInfoData.SkillsAndInterests,
    sortOrder: 'name',
    maxDropHeight: 200,
    name: 'SkillsAndInterests'
});

And this is my reset function: where i am unable reset filed

vm.ResetSerachMembers = function () {
    $("#SkillsAndInterests").val('');
}

And this is my button where i am calling reset function:

<button class="btn btn-danger" ng-disabled="data.isMembersLoading"
        ng-click="data.ResetSerachMembers();" type="button">
  Reset
</button>
0

There are 0 best solutions below