fix: modifying offsetBottom and offsetTop dose not take effect (#53607)

close #53601
This commit is contained in:
Ryan 2025-04-25 10:59:11 +08:00 committed by GitHub
parent 54c1766142
commit f05e4f02b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -238,7 +238,8 @@ const Affix = React.forwardRef<AffixRef, InternalAffixProps>((props, ref) => {
React.useEffect(() => {
addListeners();
}, [target, affixStyle, lastAffix]);
return () => removeListeners();
}, [target, affixStyle, lastAffix, offsetTop, offsetBottom]);
React.useEffect(() => {
updatePosition();