bugFixed multiCheck onBlur action

This commit is contained in:
Daniel Herrero 2017-10-19 14:13:28 +02:00
parent d72904a69e
commit 82b75d3b70
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<vn-vertical class="multi-check" vn-none class="multi-check {{$ctrl.className}}" tabindex="-1">
<vn-vertical class="multi-check" vn-none class="multi-check {{$ctrl.className}}" tabindex="1" ng-blur="$ctrl.onBlur()">
<vn-one>
<vn-horizontal>
<vn-none class="primaryCheckbox" ng-if="$ctrl.checkAll===0">

View File

@ -8,7 +8,8 @@ import './multi-check.scss';
* @param {String} className Optional css class name
*/
export default class MultiCheck {
constructor() {
constructor($timeout) {
this.$timeout = $timeout;
this._checkAll = 0;
this._models = [];
this._type = {};
@ -82,9 +83,15 @@ export default class MultiCheck {
this.type = {};
this.checkAll = 0;
}
onBlur() {
this.$timeout(() => {
this.showDropDown = false;
}, 200);
}
}
MultiCheck.$inject = [];
MultiCheck.$inject = ['$timeout'];
module.component('vnMultiCheck', {
template: require('./multi-check.html'),