Browse Source

feat(components): add disable animation option to tree.component

set nzNoAnimation default value to true
pull/6566/head
mehmet-erim 6 years ago
parent
commit
75dba7a0ad
  1. 1
      npm/ng-packs/packages/components/tree/src/lib/components/tree.component.html
  2. 1
      npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts
  3. 7
      npm/ng-packs/packages/components/tree/src/lib/tree.module.ts

1
npm/ng-packs/packages/components/tree/src/lib/components/tree.component.html

@ -12,6 +12,7 @@
(nzExpandChange)="onExpandedKeysChange($event)"
(nzCheckBoxChange)="onCheckboxChange($event)"
(nzOnDrop)="onDrop($event)"
[nzNoAnimation]="noAnimation"
></nz-tree>
<ng-template #treeTemplate let-node>
<div

1
npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts

@ -33,6 +33,7 @@ export class TreeComponent {
@Output() readonly expandedKeysChange = new EventEmitter<string[]>();
@Output() readonly selectedNodeChange = new EventEmitter();
@Output() readonly dropOver = new EventEmitter<DropEvent>();
@Input() noAnimation = true;
@Input() draggable: boolean;
@Input() checkable: boolean;
@Input() checkStrictly: boolean;

7
npm/ng-packs/packages/components/tree/src/lib/tree.module.ts

@ -1,17 +1,18 @@
import { CommonModule } from '@angular/common';
import { CoreModule } from '@abp/ng.core';
import { NgModule } from '@angular/core';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { NzNoAnimationModule } from 'ng-zorro-antd/core/no-animation';
import { NzTreeModule } from 'ng-zorro-antd/tree';
import { TreeComponent } from './components/tree.component';
import { TreeNodeTemplateDirective } from './templates/tree-node-template.directive';
import { ExpandedIconTemplateDirective } from './templates/expanded-icon-template.directive';
import { TreeNodeTemplateDirective } from './templates/tree-node-template.directive';
const templates = [TreeNodeTemplateDirective, ExpandedIconTemplateDirective];
const exported = [...templates, TreeComponent];
@NgModule({
imports: [CommonModule, NzTreeModule, NgbDropdownModule],
imports: [CoreModule, NzTreeModule, NgbDropdownModule, NzNoAnimationModule],
exports: [...exported],
declarations: [...exported],
})

Loading…
Cancel
Save