0
사용자 지정 구성 요소의 위치로 스크롤하려고했지만 올바른 html 노드를 반환하지 않습니다. "goToContactUs"메서드는 작업을 수행해야합니다. 이 작업을 수행하는 가장 좋은 방법은 무엇입니까?사용자 지정 구성 요소로 스크롤
class Help extends Component {
constructor() {
super();
this.goToContactUs = this.goToContactUs.bind(this);
}
goToContactUs() {
this.contactUs.scrollIntoView();
}
render() {
return (
<div>
<ToggleContainer
title={this.props.strings['Contact Us']}
show={this.props.help.showContactUs}
toggle={this.contactUsHandler}
ref={(div) => { this.contactUs = div }}
>
<ContactUs sendEmail={this.props.sendEmail} emailSuccess={this.props.help.emailSuccess} />
</ToggleContainer>
</div>
);
}
}