Skip to content

Commit

Permalink
Scroll into view
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wang <[email protected]>
  • Loading branch information
ruibaby committed Mar 2, 2024
1 parent e43c59a commit be578b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/comment-widget/src/base-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ export class BaseForm extends LitElement {
.form__account-info {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.75rem;
}
Expand Down
5 changes: 3 additions & 2 deletions packages/comment-widget/src/comment-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export class CommentWidget extends LitElement {
@state()
comments: CommentVoList = {
page: 1,
// TODO: change to 20
size: 5,
size: 20,
total: 0,
items: [],
first: true,
Expand Down Expand Up @@ -155,6 +154,8 @@ export class CommentWidget extends LitElement {
console.error('Failed to fetch comments', error);
} finally {
this.loading = false;

this.scrollIntoView({ block: 'start', inline: 'start', behavior: 'smooth' });
}
}

Expand Down

0 comments on commit be578b8

Please sign in to comment.