diff --git a/front/core/components/check/check.js b/front/core/components/check/check.js index 9c67cb502..63d049264 100644 --- a/front/core/components/check/check.js +++ b/front/core/components/check/check.js @@ -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'];