feat: The <Affix> run update-position when first mounted, to get the actual styles.

This commit is contained in:
徐新航 2018-12-20 15:13:10 +08:00 committed by 偏右
parent 1ac6b5782d
commit e0c74501f4

View File

@ -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);
});
}