Skip to content

Commit

Permalink
fix(module:affix): set correct style of Affix after trigger resize (#…
Browse files Browse the repository at this point in the history
…3089)

close #3040
  • Loading branch information
zd5043039119 authored and vthinkxie committed Mar 27, 2019
1 parent cf51c1f commit ff482e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/affix/nz-affix.component.ts
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 ff482e0

Please sign in to comment.