Skip to content

Commit

Permalink
chore: fix animation.disabled triggering condition (#7739)
Browse files Browse the repository at this point in the history
Co-authored-by: caoxicheng <caoxicheng@ewaresoft.com>
  • Loading branch information
caoxicheng and caoxicheng committed Nov 27, 2022
1 parent d261d70 commit 2df4860
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion components/auto-complete/autocomplete.component.ts
Expand Up @@ -62,7 +62,7 @@ export type AutocompleteDataSource = Array<AutocompleteDataSourceItem | string |
[nzNoAnimation]="noAnimation?.nzNoAnimation"
@slideMotion
(@slideMotion.done)="onAnimationEvent($event)"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
>
<div style="max-height: 256px; overflow-y: auto; overflow-anchor: none;">
<div style="display: flex; flex-direction: column;">
Expand Down
2 changes: 1 addition & 1 deletion components/cascader/cascader.component.ts
Expand Up @@ -140,7 +140,7 @@ const defaultDisplayRender = (labels: string[]): string => labels.join(' / ');
class="ant-select-dropdown ant-cascader-dropdown ant-select-dropdown-placement-bottomLeft"
[class.ant-cascader-dropdown-rtl]="dir === 'rtl'"
[@slideMotion]="'enter'"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
(mouseenter)="onTriggerMouseEnter()"
(mouseleave)="onTriggerMouseLeave($event)"
Expand Down
2 changes: 1 addition & 1 deletion components/collapse/collapse-panel.component.ts
Expand Up @@ -60,7 +60,7 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'collapsePanel';
<div
class="ant-collapse-content"
[class.ant-collapse-content-active]="nzActive"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[@collapseMotion]="nzActive ? 'expanded' : 'hidden'"
>
<div class="ant-collapse-content-box">
Expand Down
2 changes: 1 addition & 1 deletion components/dropdown/dropdown-menu.component.ts
Expand Up @@ -53,7 +53,7 @@ export type NzPlacementType = 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 't
[ngStyle]="nzOverlayStyle"
@slideMotion
(@slideMotion.done)="onAnimationEvent($event)"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
(mouseenter)="setMouseState(true)"
(mouseleave)="setMouseState(false)"
Expand Down
4 changes: 2 additions & 2 deletions components/menu/submenu.component.ts
Expand Up @@ -85,7 +85,7 @@ const listOfHorizontalPositions = [
nz-submenu-inline-child
[mode]="mode"
[nzOpen]="nzOpen"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
[menuClass]="nzMenuClassName"
[templateOutlet]="subMenuTemplate"
Expand All @@ -110,7 +110,7 @@ const listOfHorizontalPositions = [
[isMenuInsideDropDown]="isMenuInsideDropDown"
[templateOutlet]="subMenuTemplate"
[menuClass]="nzMenuClassName"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
(subMenuMouseState)="setMouseEnterState($event)"
></div>
Expand Down
2 changes: 1 addition & 1 deletion components/popconfirm/popconfirm.ts
Expand Up @@ -157,7 +157,7 @@ export class NzPopconfirmDirective extends NzTooltipBaseDirective {
[ngClass]="_classMap"
[class.ant-popover-rtl]="dir === 'rtl'"
[ngStyle]="nzOverlayStyle"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
[@zoomBigMotion]="'active'"
>
Expand Down
2 changes: 1 addition & 1 deletion components/popover/popover.ts
Expand Up @@ -115,7 +115,7 @@ export class NzPopoverDirective extends NzTooltipBaseDirective {
[class.ant-popover-rtl]="dir === 'rtl'"
[ngClass]="_classMap"
[ngStyle]="nzOverlayStyle"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
[@zoomBigMotion]="'active'"
>
Expand Down
4 changes: 2 additions & 2 deletions components/select/select.component.ts
Expand Up @@ -105,7 +105,7 @@ export type NzSelectSizeType = 'large' | 'default' | 'small';
[open]="nzOpen"
[disabled]="nzDisabled"
[mode]="nzMode"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
[maxTagPlaceholder]="nzMaxTagPlaceholder"
[removeIcon]="nzRemoveIcon"
Expand Down Expand Up @@ -164,7 +164,7 @@ export type NzSelectSizeType = 'large' | 'default' | 'small';
[class.ant-select-dropdown-placement-bottomRight]="dropDownPosition === 'bottomRight'"
[class.ant-select-dropdown-placement-topRight]="dropDownPosition === 'topRight'"
[@slideMotion]="'enter'"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
[listOfContainerItem]="listOfContainerItem"
[menuItemSelectedIcon]="nzMenuItemSelectedIcon"
Expand Down
2 changes: 1 addition & 1 deletion components/tooltip/tooltip.ts
Expand Up @@ -109,7 +109,7 @@ export class NzTooltipDirective extends NzTooltipBaseDirective {
[class.ant-tooltip-rtl]="dir === 'rtl'"
[ngClass]="_classMap"
[ngStyle]="nzOverlayStyle"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
[@zoomBigMotion]="'active'"
>
Expand Down
2 changes: 1 addition & 1 deletion components/tree-select/tree-select.component.ts
Expand Up @@ -89,7 +89,7 @@ const TREE_SELECT_DEFAULT_CLASS = 'ant-select-dropdown ant-select-tree-dropdown'
<div
[@slideMotion]="'enter'"
[ngClass]="dropdownClassName"
[@.disabled]="noAnimation?.nzNoAnimation"
[@.disabled]="!!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
[class.ant-select-dropdown-placement-bottomLeft]="dropDownPosition === 'bottom'"
[class.ant-select-dropdown-placement-topLeft]="dropDownPosition === 'top'"
Expand Down
2 changes: 1 addition & 1 deletion components/tree-view/tree-view.ts
Expand Up @@ -17,7 +17,7 @@ import { NzTreeView } from './tree';
template: `
<div class="ant-tree-list-holder">
<div
[@.disabled]="!_afterViewInit || noAnimation?.nzNoAnimation"
[@.disabled]="!_afterViewInit || !!noAnimation?.nzNoAnimation"
[@treeCollapseMotion]="_nodeOutlet.viewContainer.length"
class="ant-tree-list-holder-inner"
>
Expand Down
2 changes: 1 addition & 1 deletion components/tree/tree.component.ts
Expand Up @@ -89,7 +89,7 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'tree';
*ngIf="!nzVirtualHeight"
[class.ant-select-tree-list-holder-inner]="nzSelectMode"
[class.ant-tree-list-holder-inner]="!nzSelectMode"
[@.disabled]="beforeInit || noAnimation?.nzNoAnimation"
[@.disabled]="beforeInit || !!noAnimation?.nzNoAnimation"
[nzNoAnimation]="noAnimation?.nzNoAnimation"
[@treeCollapseMotion]="nzFlattenNodes.length"
>
Expand Down

0 comments on commit 2df4860

Please sign in to comment.