In my current project, I have an input which is a kendo-auto-complete element. I have a category data source and when I type the categories will be visible from where I can select. Also I can type a new category name in the text box and enter, it'll be added to the categories. I have a bug when I added a new category and then when I select an existing category from the auto complete, only 1 or 2 characters being added to the category.
This is my html element
<form ng-submit="addCategory(categoryInput)">
<input id="category" type="text" kendo-auto-complete ng-model="categoryInput" k-data-source="categories"/>
</form>
In the controller
$scope.addCategory = function(category) {
$scope.cCategories.push(category);
$scope.categoryInput = "";
};
Requirement:
After adding a new category, and when selected an existing category from the autocomplete list, the whole text must be added