Skip to content

Commit c4baf2a

Browse files
committed
rebuild
1 parent f286acc commit c4baf2a

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

demo/build/bundle.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21719,7 +21719,18 @@
2171921719
_createClass(ScrollLock, [{
2172021720
key: 'componentDidMount',
2172121721
value: function componentDidMount() {
21722-
this.scrollingElement.addEventListener('wheel', this.onScrollHandler, false);
21722+
if (this.props.enabled) {
21723+
this.scrollingElement.addEventListener('wheel', this.onScrollHandler, false);
21724+
}
21725+
}
21726+
}, {
21727+
key: 'componentWillReceiveProps',
21728+
value: function componentWillReceiveProps(nextProps) {
21729+
if (nextProps.enabled) {
21730+
this.scrollingElement.addEventListener('wheel', this.onScrollHandler, false);
21731+
} else {
21732+
this.scrollingElement.removeEventListener('wheel', this.onScrollHandler, false);
21733+
}
2172321734
}
2172421735
}, {
2172521736
key: 'componentWillUnmount',
@@ -21736,6 +21747,10 @@
2173621747
return ScrollLock;
2173721748
}(_react.Component);
2173821749

21750+
ScrollLock.defaultProps = {
21751+
enabled: true
21752+
};
21753+
2173921754
exports.default = ScrollLock;
2174021755
//# sourceMappingURL=ScrollLock.js.map
2174121756

lib/ScrollLock.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ScrollLock.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)