diff --git a/components/tree-select/nz-tree-select.component.ts b/components/tree-select/nz-tree-select.component.ts index 32e2bdad4d7..457868829f7 100644 --- a/components/tree-select/nz-tree-select.component.ts +++ b/components/tree-select/nz-tree-select.component.ts @@ -47,7 +47,6 @@ import { NzTreeNode, NzTreeNodeOptions, slideMotion, - warnDeprecation, WithConfig, zoomMotion } from 'ng-zorro-antd/core'; @@ -123,17 +122,6 @@ export class NzTreeSelectComponent extends NzTreeBase implements ControlValueAcc @Input() @WithConfig(NZ_CONFIG_COMPONENT_NAME, 'default') nzSize: NzSizeLDSType; @Input() nzPlaceHolder = ''; @Input() nzDropdownStyle: { [key: string]: string }; - /** - * @deprecated 9.0.0 - use `nzExpandedKeys` instead. - */ - @Input() - set nzDefaultExpandedKeys(value: string[]) { - warnDeprecation(`'nzDefaultExpandedKeys' would be removed in 9.0.0. Please use 'nzExpandedKeys' instead.`); - this.expandedKeys = value; - } - get nzDefaultExpandedKeys(): string[] { - return this.expandedKeys; - } @Input() set nzExpandedKeys(value: string[]) { diff --git a/components/tree-select/nz-tree-select.spec.ts b/components/tree-select/nz-tree-select.spec.ts index c9482bf0a25..6540efcdfee 100644 --- a/components/tree-select/nz-tree-select.spec.ts +++ b/components/tree-select/nz-tree-select.spec.ts @@ -494,7 +494,6 @@ describe('tree-select component', () => { testComponent.expandKeys = []; treeSelect.nativeElement.click(); fixture.detectChanges(); - expect(treeSelectComponent.nzDefaultExpandedKeys.length === 0).toBe(true); expect(treeSelectComponent.nzExpandedKeys.length === 0).toBe(true); expect(treeSelectComponent.nzOpen).toBe(true); let targetSwitcher = overlayContainerElement.querySelector('.ant-select-tree-switcher')!; @@ -503,7 +502,6 @@ describe('tree-select component', () => { dispatchMouseEvent(targetSwitcher, 'click'); fixture.detectChanges(); expect(targetSwitcher.classList.contains('ant-select-tree-switcher_open')).toBe(true); - expect(treeSelectComponent.nzDefaultExpandedKeys[0] === '1001').toBe(true); expect(treeSelectComponent.nzExpandedKeys[0] === '1001').toBe(true); treeSelect.nativeElement.click(); fixture.detectChanges(); @@ -513,7 +511,6 @@ describe('tree-select component', () => { targetSwitcher = overlayContainerElement.querySelector('.ant-select-tree-switcher')!; expect(treeSelectComponent.nzOpen).toBe(true); expect(targetSwitcher.classList.contains('ant-select-tree-switcher_open')).toBe(true); - expect(treeSelectComponent.nzDefaultExpandedKeys[0] === '1001').toBe(true); expect(treeSelectComponent.nzExpandedKeys[0] === '1001').toBe(true); }); }); @@ -636,7 +633,7 @@ export class NzTestTreeSelectBasicComponent { Observable; @Input() @InputBoolean() nzMultiple = false; @@ -118,33 +100,6 @@ export class NzTreeComponent extends NzTreeBase implements OnInit, OnDestroy, Co this.initNzData(value); } - /** - * @deprecated 9.0.0 - use `nzExpandedKeys` instead. - */ - @Input() - set nzDefaultExpandedKeys(value: string[]) { - warnDeprecation(`'nzDefaultExpandedKeys' would be removed in 9.0.0. Please use 'nzExpandedKeys' instead.`); - this.nzDefaultSubject.next({ type: 'nzExpandedKeys', keys: value }); - } - - /** - * @deprecated 9.0.0 - use `nzSelectedKeys` instead. - */ - @Input() - set nzDefaultSelectedKeys(value: string[]) { - warnDeprecation(`'nzDefaultSelectedKeys' would be removed in 9.0.0. Please use 'nzSelectedKeys' instead.`); - this.nzDefaultSubject.next({ type: 'nzSelectedKeys', keys: value }); - } - - /** - * @deprecated 9.0.0 - use `nzCheckedKeys` instead. - */ - @Input() - set nzDefaultCheckedKeys(value: string[]) { - warnDeprecation(`'nzDefaultCheckedKeys' would be removed in 9.0.0. Please use 'nzCheckedKeys' instead.`); - this.nzDefaultSubject.next({ type: 'nzCheckedKeys', keys: value }); - } - @Input() set nzExpandedKeys(value: string[]) { this.nzDefaultSubject.next({ type: 'nzExpandedKeys', keys: value }); @@ -166,11 +121,6 @@ export class NzTreeComponent extends NzTreeBase implements OnInit, OnDestroy, Co this.nzTreeService.searchExpand(value); if (isNotNil(value)) { this.nzSearchValueChange.emit(this.nzTreeService.formatEvent('search', null, null)); - /** - * @deprecated 9.0.0 - use `nzOnSearchNode` instead. - * Hide warning, need remove next version - */ - this.nzOnSearchNode.emit(this.nzTreeService.formatEvent('search', null, null)); } } @@ -191,11 +141,6 @@ export class NzTreeComponent extends NzTreeBase implements OnInit, OnDestroy, Co @Output() readonly nzSearchValueChange = new EventEmitter(); - /** - * @deprecated use `nzSearchValueChange` instead. - */ - @Output() readonly nzOnSearchNode = new EventEmitter(); - @Output() readonly nzClick = new EventEmitter(); @Output() readonly nzDblClick = new EventEmitter(); @Output() readonly nzContextMenu = new EventEmitter(); diff --git a/components/tree/nz-tree.spec.ts b/components/tree/nz-tree.spec.ts index 5213ecd3505..63b33ab8dfa 100644 --- a/components/tree/nz-tree.spec.ts +++ b/components/tree/nz-tree.spec.ts @@ -30,7 +30,7 @@ describe('nz-tree', () => { treeElement = fixture.debugElement.query(By.directive(NzTreeComponent)).nativeElement; })); - it('should set nzDefaultXXX correctly', fakeAsync(() => { + it('should set default property correctly', fakeAsync(() => { fixture.detectChanges(); flush(); tick(300); @@ -878,10 +878,10 @@ export class NzTestTreeDraggableComponent {