Refactor multicheck para que acepte la propiedad disabled

This commit is contained in:
gerard 2018-05-18 14:59:56 +02:00
parent 8cbe02a1b6
commit e118798c69
2 changed files with 6 additions and 28 deletions

View File

@ -1,5 +1,5 @@
import ngModule from '../../module'; import ngModule from '../../module';
import './multi-check.scss'; import Input from '../../lib/input';
/** /**
* Draw checkbox with a drop-down and multi options * Draw checkbox with a drop-down and multi options
@ -7,8 +7,9 @@ import './multi-check.scss';
* @param {Array} data List of options shown in drop-down * @param {Array} data List of options shown in drop-down
* @param {Array} models Elements to check / unCheck * @param {Array} models Elements to check / unCheck
*/ */
export default class MultiCheck { export default class MultiCheck extends Input {
constructor() { constructor($element, $scope) {
super($element, $scope);
this._checkAll = false; this._checkAll = false;
this.checkField = 'checked'; this.checkField = 'checked';
} }
@ -36,7 +37,8 @@ ngModule.component('vnMultiCheck', {
bindings: { bindings: {
data: '=', data: '=',
checkField: '<?', checkField: '<?',
checkAll: '=?' checkAll: '=?',
disabled: '<?'
} }
}); });

View File

@ -1,24 +0,0 @@
.multi-check {
vn-icon{
cursor: pointer;
}
.primaryCheckbox {
vn-icon{
font-size: 22px;
margin-left: -4px;
i{
color: rgba(0,0,0,.54);
}
}
&.color {
i{
color: rgb(255,152,0);
}
}
}
.arrow_down{
i{
padding-top: 8px;
}
}
}