react-scroll-to-component icon indicating copy to clipboard operation
react-scroll-to-component copied to clipboard

Offset does not do anything

Open MattGson opened this issue 7 years ago • 0 comments

The offset value does not seem to do anything. The scroll works fine but it always scrolls exactly to the top of the component. I have tried many different values for offset including negative values.

`scroll = () => { scrollToComponent(this.productInfo, { offset: 400, align: 'top', duration: 1000 }); };

render () {
    return (
    <div>
        <Nav/>
        <MastHead clickHandler={this.scroll}/>
        <ProductInfo inputRef={node => this.productInfo = node}/>
    </div>
    );
}`

MattGson avatar Apr 05 '18 01:04 MattGson