mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Bind the onWheel listener directly to props
React doesn't seem to care if this is null/undefined.
This commit is contained in:
parent
138fd4ec87
commit
17a57eb3e5
1 changed files with 1 additions and 7 deletions
|
@ -118,19 +118,13 @@ export default class AutoHideScrollbar extends React.Component {
|
|||
return this.containerRef.scrollTop;
|
||||
}
|
||||
|
||||
onWheel = (e) => {
|
||||
if (this.props.onWheel) {
|
||||
this.props.onWheel(e);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
return (<div
|
||||
ref={this._collectContainerRef}
|
||||
style={this.props.style}
|
||||
className={["mx_AutoHideScrollbar", this.props.className].join(" ")}
|
||||
onScroll={this.props.onScroll}
|
||||
onWheel={this.onWheel}
|
||||
onWheel={this.props.onWheel}
|
||||
>
|
||||
<div className="mx_AutoHideScrollbar_offset">
|
||||
{ this.props.children }
|
||||
|
|
Loading…
Reference in a new issue