active: PropTypes.bool,
hideHeadingOnMobile: PropTypes.bool,
name: PropTypes.string,
+ bindToDocument: PropTypes.bool,
};
handleHeaderClick = () => {
- const scrollable = this.node.querySelector('.scrollable');
+ const scrollable = this.props.bindToDocument ? document.scrollingElement : this.node.querySelector('.scrollable');
if (!scrollable) {
return;
}
scrollTop () {
- const scrollable = this.node.querySelector('.scrollable');
+ const scrollable = this.props.bindToDocument ? document.scrollingElement : this.node.querySelector('.scrollable');
if (!scrollable) {
return;