mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-04 23:16:50 +08:00
feat: The <Affix> run update-position when first mounted, to get the actual styles.
This commit is contained in:
parent
1ac6b5782d
commit
e0c74501f4
@ -218,6 +218,8 @@ export default class Affix extends React.Component<AffixProps, AffixState> {
|
||||
// Wait for parent component ref has its value
|
||||
this.timeout = setTimeout(() => {
|
||||
this.setTargetEventListeners(target);
|
||||
// Mock Event object.
|
||||
this.updatePosition({} as Event);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user