Browse Source

fix: 🐛 Affix state update on unmounted component (#22790)

close #22683
pull/22797/head
偏右 5 years ago
committed by afc163
parent
commit
0c1f181957
  1. 2
      components/affix/index.tsx

2
components/affix/index.tsx

@ -116,6 +116,8 @@ class Affix extends React.Component<AffixProps, AffixState> {
clearTimeout(this.timeout);
removeObserveTarget(this);
(this.updatePosition as any).cancel();
// https://github.com/ant-design/ant-design/issues/22683
(this.lazyUpdatePosition as any).cancel();
}
getOffsetTop = () => {

Loading…
Cancel
Save