Skip to content

Commit

Permalink
fix(content): scrollToTop
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Aug 11, 2018
1 parent 3ab835c commit 695abcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/components/content/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ export class Content {
* Scroll to the top of the component
*/
@Method()
scrollToTop(duration = 100): Promise<void> {
return this.scrollToPoint(0, undefined, duration);
scrollToTop(duration = 0): Promise<void> {
return this.scrollToPoint(undefined, 0, duration);
}

/**
* Scroll to the bottom of the component
*/
@Method()
scrollToBottom(duration = 100): Promise<void> {
scrollToBottom(duration = 0): Promise<void> {
const y = this.scrollEl.scrollHeight - this.scrollEl.clientHeight;
return this.scrollToPoint(undefined, y, duration);
}
Expand Down

0 comments on commit 695abcf

Please sign in to comment.