fix(content): only emit scroll events if enabled (#20401)

This commit is contained in:
Liam DeBeasi
2020-02-07 11:53:11 -05:00
committed by GitHub
parent 916f6670a0
commit fd1b44a40b

View File

@ -329,7 +329,7 @@ export class Content implements ComponentInterface {
'overscroll': (scrollX || scrollY) && forceOverscroll
}}
ref={el => this.scrollEl = el!}
onScroll={ev => this.onScroll(ev)}
onScroll={(this.scrollEvents) ? ev => this.onScroll(ev) : undefined}
>
<slot></slot>
</main>