Skip to content

Commit d744c5c

Browse files
committed
feat(ui): when new ingredient added, scroll to it
1 parent aca145f commit d744c5c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/OriginalTable.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function addIngredient() {
4545
let nameInputs = last.getElementsByClassName('cell-name')
4646
if (nameInputs.length > 0) {
4747
nameInputs[0].focus()
48+
last.scrollIntoView({ 'behavior': 'smooth' })
4849
}
4950
}
5051
})

0 commit comments

Comments
 (0)