diff options
author | bobzel <zzzman@gmail.com> | 2023-03-23 18:18:12 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-03-23 18:18:12 -0400 |
commit | 911bd3d5e395afa6b7eaf3bdf957b27325c3e46a (patch) | |
tree | b37842caa6cd98510201e633e3bdabac9d02b036 /src | |
parent | eb5c84093d0741a99aa416f01806c60152419603 (diff) |
fixed outer freefrom from scrolling when scrolling the new fields list in a SchemaView
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 839a5f911..4fc4c4881 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -774,7 +774,18 @@ export class CollectionSchemaView extends CollectionSubView() { })}> + new field </div> - <div className="schema-key-list"> + <div + className="schema-key-list" + ref={r => + r?.addEventListener( + 'wheel', // if scrollTop is 0, then don't let wheel trigger scroll on any container (which it would since onScroll won't be triggered on this) + (e: WheelEvent) => { + if (!r.scrollTop && e.deltaY <= 0) e.preventDefault(); + e.stopPropagation(); + }, + { passive: false } + ) + }> {this._menuOptions.map(key => ( <div className="schema-key-search-result" |