We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a18c871 commit 73c9482Copy full SHA for 73c9482
src/table/lock/body.jsx
@@ -34,12 +34,15 @@ export default class LockBody extends React.Component {
34
};
35
36
render() {
37
- return (
38
- <FixedBody
39
- {...this.props}
40
- onScroll={this.onBodyScroll}
41
- onWheel={this.onBodyWheel}
42
- />
43
- );
+ const { lockType } = this.context;
+
+ const events = lockType
+ ? {
+ onWheel: this.onBodyWheel,
+ }
+ : {
44
+ onScroll: this.onBodyScroll,
45
+ };
46
+ return <FixedBody {...this.props} {...events} />;
47
}
48
0 commit comments