Skip to content

Commit

Permalink
fix(module:affix): set correct style of Affix after trigger resize (N…
Browse files Browse the repository at this point in the history
  • Loading branch information
zd5043039119 authored and Ricbet committed Apr 9, 2020
1 parent 9a27217 commit 5e4d924
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/affix/nz-affix.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,13 @@ export class NzAffixComponent implements OnInit, OnDestroy {
return;
}
this.placeholderNode.style.cssText = '';
const widthObj = { width: this.placeholderNode.offsetWidth };
this.placeholderStyle = undefined;
const styleObj = { width: this.placeholderNode.offsetWidth, height: this.fixedEl.nativeElement.offsetHeight };
this.setAffixStyle(e, {
...this.affixStyle,
...widthObj
...styleObj
});
this.setPlaceholderStyle(widthObj);
this.setPlaceholderStyle(styleObj);
}

@throttleByAnimationFrameDecorator()
Expand Down

0 comments on commit 5e4d924

Please sign in to comment.