Closed jossmac closed 5 years ago
Simplify consumer implementation by removing the necessity for a touchScrollTarget prop that passes refs around. Used like:
touchScrollTarget
import ScrollLock, { TouchScrollable } from 'react-scrolllock'; // lock children will be wrapped by TouchScrollable <ScrollLock> <div style={{ height: 200, overflowY: 'auto' }}>{/* ... */}</div> </ScrollLock> // or, if you're app structure doesn't allow the above <ScrollLock /> <TouchScrollable> <div style={{ height: 200, overflowY: 'auto' }}>{/* ... */}</div> </TouchScrollable>
Also introduces a companion component, which is a thin wrapper around ScrollLock:
<ScrollLockToggle isActive={someProp} />
We just ran into #33 as well, anything we can do to help get this merged?
So - when?
4.0.0 is available on npm
4.0.0
Simplify consumer implementation by removing the necessity for a
touchScrollTarget
prop that passes refs around. Used like:Also introduces a companion component, which is a thin wrapper around ScrollLock: