Skip to content

Commit

Permalink
fix(module:cascader): fix cascader disable bug in reactive form
Browse files Browse the repository at this point in the history
  • Loading branch information
t1mer committed Aug 30, 2017
1 parent 2310c2d commit ebbc8ad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/cascader/nz-cascader.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,16 @@ export class NzCascaderComponent implements OnInit, OnDestroy, OnChanges, AfterV
this.onTouched = fn;
}

setDisabledState(isDisabled: boolean): void {
if (isDisabled) {
this._closeMenu();
this._addHostClass(`${this._prefixCls}-picker-disabled`);
} else {
this._removeHostClass(`${this._prefixCls}-picker-disabled`);
}
this.nzDisabled = isDisabled;
}

ngOnInit() {
// 设置第一列
if (this.nzOptions && this.nzOptions.length) {
Expand Down

0 comments on commit ebbc8ad

Please sign in to comment.