From f190bc76d42860670d9891ac27ade528cfe6b87f Mon Sep 17 00:00:00 2001 From: "mark.ck" Date: Mon, 28 Jan 2019 16:22:56 +0800 Subject: [PATCH] feat(Affix): receive the change of offset props --- src/affix/index.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/affix/index.jsx b/src/affix/index.jsx index e11dfea515..c8813e7ecb 100644 --- a/src/affix/index.jsx +++ b/src/affix/index.jsx @@ -62,6 +62,11 @@ class Affix extends React.Component { }); } + componentWillReceiveProps(props) { + this.affixMode = this._getAffixMode(props); + this.updatePosition(); + } + componentWillUnmount() { if (this.timeout) { clearTimeout(this.timeout);