angucomplete icon indicating copy to clipboard operation
angucomplete copied to clipboard

On Blur (On Change) action

Open mhipo1364 opened this issue 8 years ago • 1 comments

Hi guys

Is there any event listener about blur or change action in input?

mhipo1364 avatar Jun 22 '16 20:06 mhipo1364

add this "onBlur": "&" to scope. add onBlur to selectResult:

            vm.selectResult = function(result) {
                if (vm.matchClass) {
                    result.title = result.title.toString().replace(/(<([^>]+)>)/ig, '');
                }
                vm.searchStr = vm.lastSearchTerm = result.title;
               // vm.selectedObject = result;
                vm.selectedObject = result.originalObject;
                vm.onBlur({user:result.originalObject});
                vm.searchStr = "";
                vm.showDropdown = false;
                vm.results = [];
                //$scope.$apply();
            }

and this :

<ibd-autocomplete-input id="{{vm.unicId}}"
                           placeholder="{{vm.unicId}}"
                           pause="100"
                           selectedobject="vm.input"
                           localdata="vm.allUsers"
                           searchfields="username"
                           titlefield="username"
                           minlength="1"
                           imagefield="pic"
                           inputclass="form-control form-control-small"
                           on-blur = "vm.addUser(user)"
                           />

milad1367 avatar Jun 14 '18 07:06 milad1367