mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-09-13 04:55:13 -05:00
Splatfest history dialog: scroll to the top when changing regions
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-card-body">
|
||||
<div class="modal-card-body" ref="body">
|
||||
<div v-for="(info, index) in festivals" class="splatfest-history-row" :key="info.festival.festival_id">
|
||||
<div class="level">
|
||||
<div class="level-item">
|
||||
@@ -81,6 +81,11 @@ export default {
|
||||
});
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
region() {
|
||||
this.scrollToTop();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.initialRegion)
|
||||
this.region = this.initialRegion;
|
||||
@@ -88,5 +93,10 @@ export default {
|
||||
mounted() {
|
||||
analytics.event('Splatfest History', 'Open');
|
||||
},
|
||||
methods: {
|
||||
scrollToTop() {
|
||||
this.$refs.body.scrollTop = 0;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user