Skip to content

Commit

Permalink
feat: improve scroll to view when the form is in validation state
Browse files Browse the repository at this point in the history
  • Loading branch information
usamaidrsk committed Apr 25, 2024
1 parent bc125ee commit c49e099
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/scroll-into-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export function scrollIntoView(viewId: string, shouldFocus: boolean = false) {
const currentElement = document.getElementById(viewId);
currentElement?.scrollIntoView({
behavior: 'smooth',
block: 'start',
inline: 'start',
block: 'center',
inline: 'center',
});

if (shouldFocus) {
Expand Down

0 comments on commit c49e099

Please sign in to comment.