added tripleState setter
This commit is contained in:
parent
fe2c74c8c8
commit
c3903b8d51
|
@ -37,13 +37,23 @@ export default class Controller extends Component {
|
|||
return this._field;
|
||||
}
|
||||
|
||||
set tripleState(value) {
|
||||
this._tripleState = value;
|
||||
this.checkIntermediate();
|
||||
}
|
||||
|
||||
get tripleState() {
|
||||
return this._tripleState;
|
||||
}
|
||||
|
||||
checkIntermediate() {
|
||||
if ((this.intermediate || (!this._field && this.tripleState)) && !this.isIntermediate) {
|
||||
this.isIntermediate = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this.isIntermediate = false;
|
||||
if (!this.intermediate)
|
||||
this.isIntermediate = false;
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$element', '$scope', '$attrs'];
|
||||
|
|
Loading…
Reference in New Issue