React-custom-scrollbars: Why there is no option to disable scroll arbitrarily?

Created on 3 Dec 2019  路  2Comments  路  Source: malte-wessel/react-custom-scrollbars

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?

Most helpful comment

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

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

All 2 comments

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

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

<Scrollbars
   renderView={({ style, ...props }) =>
        <div
            {...props}
            style={{
                overflowY: preventScroll ? 'hidden' : 'scroll',
                {...style}
            }}
         />
    }
/>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

leofle picture leofle  路  4Comments

bunkat picture bunkat  路  5Comments

anupmishra203 picture anupmishra203  路  3Comments

webchaz picture webchaz  路  3Comments

nindavidw picture nindavidw  路  4Comments