react-custom-scrollbars icon indicating copy to clipboard operation
react-custom-scrollbars copied to clipboard

Why there is no option to disable scroll arbitrarily?

Open PLSFIX opened this issue 4 years ago • 2 comments

When using browser scroll, I always have an option to disable scroll with css overflow property. And I can do it whenever I want. Why there is not the case here? Why there is no simple single option like disabled: boolean to control it? Are there some fundamental problems to implement it?

PLSFIX avatar Dec 03 '19 17:12 PLSFIX

oh,I also have this demand. Do you have any other way to solve it, thank you

yizhengfeng-jj avatar Dec 04 '19 07:12 yizhengfeng-jj

Agreed this would be a good addition, this is my current solution

<Scrollbars
   renderView={({ style, ...props }) =>
        <div
            {...props}
            style={{
                overflowY: preventScroll ? 'hidden' : 'scroll',
                {...style}
            }}
         />
    }
/>

RobPethick avatar Jan 06 '20 14:01 RobPethick