mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 22:39:34 +08:00
docs(Anchor): fix targetOffset prop doc of review change
This commit is contained in:
parent
b02e433226
commit
b3537d5c38
@ -269,7 +269,7 @@ export default class Anchor extends React.Component<AnchorProps, AnchorState> {
|
||||
const { offsetTop, getContainer, targetOffset } = this.props as AnchorDefaultProps;
|
||||
this.animating = true;
|
||||
this.setState({ activeLink: link });
|
||||
scrollTo(link, targetOffset || offsetTop || 0, getContainer, () => {
|
||||
scrollTo(link, targetOffset !== undefined ? targetOffset : offsetTop, getContainer, () => {
|
||||
this.animating = false;
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user