Skip to content

Commit 73c9482

Browse files
committed
fix(Table): bug of scrolling on node of cell, close #1308, #1377
1 parent a18c871 commit 73c9482

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/table/lock/body.jsx

+10-7
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ export default class LockBody extends React.Component {
3434
};
3535

3636
render() {
37-
return (
38-
<FixedBody
39-
{...this.props}
40-
onScroll={this.onBodyScroll}
41-
onWheel={this.onBodyWheel}
42-
/>
43-
);
37+
const { lockType } = this.context;
38+
39+
const events = lockType
40+
? {
41+
onWheel: this.onBodyWheel,
42+
}
43+
: {
44+
onScroll: this.onBodyScroll,
45+
};
46+
return <FixedBody {...this.props} {...events} />;
4447
}
4548
}

0 commit comments

Comments
 (0)