I have a Font Awesome icon picker, which I use for my application so the employees can easily access the different icons without searching for the codes online.
Now when I click on an icon, it does not update the ng-model. I first have to enter another character or a space for AngularJS to identify the changes made in the input.
https://i.gyazo.com/21d80e370726166a200f1165e169a0cf.gif, hereby the example of what's happening.
As you can see, in the bottom left I have made a label showing the data that's in the same ng-model. Now when I choose an icon, the model doesn't update. Only after I enter a space, or another character it's updating.
The code I have:
editCellTemplate: function (container, options) {
container.html('<input class="icon-picker-input edit icp icp-auto" type="text" ng-model="iconInput" /><script>$(".icp-auto").iconpicker();</script>');
options.setValue($scope.iconInput);
$compile(container)($scope);
}
I'm using a gridview from DevExtreme with a custom editCellTemplate
.
The binding:
Which is declared here:
Does anyone have a clue on how to fix this? Thanks in advance!