aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-05-01 15:32:10 -0400
committerbobzel <zzzman@gmail.com>2025-05-01 15:32:10 -0400
commitd993a3a389464773d04b31de5d427ec4eb5e3d5b (patch)
treeb60a98aacd67769043f96dde14ce12cfa299264f /src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
parent95db4029fdfa8b1951c29144fdb9e589b77fd77a (diff)
cleaned up, a bit, how wheel events are blocked from propagating.
Diffstat (limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 82ca96839..c06391f35 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -1293,7 +1293,6 @@ export class CollectionSchemaView extends CollectionSubView() {
isContentActive = () => this._props.isSelected() || this._props.isContentActive();
screenToLocal = () => this.ScreenToLocalBoxXf().translate(-this.tableWidth, 0);
previewWidthFunc = () => this.previewWidth;
- onPassiveWheel = (e: WheelEvent) => e.stopPropagation();
displayedDocsFunc = () => this.docsWithDrag.docs;
render() {
return (
@@ -1307,15 +1306,7 @@ export class CollectionSchemaView extends CollectionSubView() {
this.setColDrag(false);
}}>
<div ref={this._menuTarget} style={{ background: 'red', top: 0, left: 0, position: 'absolute', zIndex: 10000 }} />
- <div
- className="schema-table"
- style={{ width: `calc(100% - ${this.previewWidth}px)` }}
- onWheel={e => this._props.isContentActive() && e.stopPropagation()}
- ref={ele => {
- // prevent wheel events from passively propagating up through containers and prevents containers from preventDefault which would block scrolling
- this._oldWheel?.removeEventListener('wheel', this.onPassiveWheel);
- (this._oldWheel = ele)?.addEventListener('wheel', this.onPassiveWheel, { passive: false });
- }}>
+ <div className="schema-table" style={{ width: `calc(100% - ${this.previewWidth}px)` }} onWheel={e => this._props.isContentActive() && e.stopPropagation()} ref={ele => this.fixWheelEvents(ele, this._props.isContentActive)}>
<div className="schema-header-row" style={{ height: this.rowHeightFunc() }}>
<div className="row-menu" style={{ width: CollectionSchemaView._rowMenuWidth }}>
<IconButton