mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
fix: modifying offsetBottom
and offsetTop
dose not take effect (#53607)
close #53601
This commit is contained in:
parent
54c1766142
commit
f05e4f02b4
@ -238,7 +238,8 @@ const Affix = React.forwardRef<AffixRef, InternalAffixProps>((props, ref) => {
|
|||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
addListeners();
|
addListeners();
|
||||||
}, [target, affixStyle, lastAffix]);
|
return () => removeListeners();
|
||||||
|
}, [target, affixStyle, lastAffix, offsetTop, offsetBottom]);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
updatePosition();
|
updatePosition();
|
||||||
|
Loading…
Reference in New Issue
Block a user