diff options
Diffstat (limited to 'client/src/app/helpers/utils.ts')
-rw-r--r-- | client/src/app/helpers/utils.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/helpers/utils.ts b/client/src/app/helpers/utils.ts index d9007dd77..a22507f46 100644 --- a/client/src/app/helpers/utils.ts +++ b/client/src/app/helpers/utils.ts | |||
@@ -144,8 +144,12 @@ function sortBy (obj: any[], key1: string, key2?: string) { | |||
144 | }) | 144 | }) |
145 | } | 145 | } |
146 | 146 | ||
147 | function scrollToTop () { | 147 | function scrollToTop (behavior: 'auto' | 'smooth' = 'auto') { |
148 | window.scroll(0, 0) | 148 | window.scrollTo({ |
149 | left: 0, | ||
150 | top: 0, | ||
151 | behavior | ||
152 | }) | ||
149 | } | 153 | } |
150 | 154 | ||
151 | function isInViewport (el: HTMLElement) { | 155 | function isInViewport (el: HTMLElement) { |