Skip to content

Commit 1717569

Browse files
committed
fix: when iconSet or icons property changes scroll to top of scroll area
1 parent 1817c80 commit 1717569

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/component/QIconPicker.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ export default Vue.extend({
118118
// whenever the icon set changes, it resets pagination page to page 1
119119
this.setPagination({ page: 1 })
120120
})
121+
// scroll to top of QScrollArea, if applicable
122+
this.$refs.scrollArea.setScrollPosition(0)
121123
},
122124

123125
icons (val) {
@@ -129,6 +131,8 @@ export default Vue.extend({
129131
// whenever the icon set changes, it resets pagination page to page 1
130132
this.setPagination({ page: 1 })
131133
})
134+
// scroll to top of QScrollArea, if applicable
135+
this.$refs.scrollArea.setScrollPosition(0)
132136
},
133137

134138
pagination (newVal, oldVal) {

0 commit comments

Comments
 (0)