aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/ScrollBox.tsx
diff options
context:
space:
mode:
authorljungster <parkerljung@gmail.com>2022-08-09 11:52:07 -0500
committerljungster <parkerljung@gmail.com>2022-08-09 11:52:07 -0500
commitda3cb00f809a482a9fdf732f6a656fbc467cce27 (patch)
tree9eb1fd278bc71d080d71bbfb7e3aec482d35f439 /src/client/util/ScrollBox.tsx
parent1638527259a072dfc2ab286bd27bbb1751e8434e (diff)
parent26670c8b9eb6e2fd981c3a0997bff5556b60504b (diff)
Merge branch 'parker' of https://github.com/brown-dash/Dash-Web into parker
Diffstat (limited to 'src/client/util/ScrollBox.tsx')
-rw-r--r--src/client/util/ScrollBox.tsx23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/client/util/ScrollBox.tsx b/src/client/util/ScrollBox.tsx
index a209874a3..d4620ae3f 100644
--- a/src/client/util/ScrollBox.tsx
+++ b/src/client/util/ScrollBox.tsx
@@ -1,21 +1,24 @@
-import React = require("react");
+import React = require('react');
-export class ScrollBox extends React.Component {
+export class ScrollBox extends React.Component<React.PropsWithChildren<{}>> {
onWheel = (e: React.WheelEvent) => {
- if (e.currentTarget.scrollHeight > e.currentTarget.clientHeight) { // If the element has a scroll bar, then we don't want the containing collection to zoom
+ if (e.currentTarget.scrollHeight > e.currentTarget.clientHeight) {
+ // If the element has a scroll bar, then we don't want the containing collection to zoom
e.stopPropagation();
}
- }
+ };
render() {
return (
- <div style={{
- overflow: "auto",
- width: "100%",
- height: "100%",
- }} onWheel={this.onWheel}>
+ <div
+ style={{
+ overflow: 'auto',
+ width: '100%',
+ height: '100%',
+ }}
+ onWheel={this.onWheel}>
{this.props.children}
</div>
);
}
-} \ No newline at end of file
+}