Skip to content

Commit 276b223

Browse files
committed
[feature] Allow to view more rows per page in game event table
1 parent f76d0fb commit 276b223

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/components/events/Events.vue

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
:per-page="perPage">
1111
</b-pagination>
1212

13+
<input v-model.number="perPage"
14+
title="Rows per page"
15+
min="1"
16+
max="99"
17+
type="number"
18+
/>
19+
1320
<b-btn v-b-modal.new-event-modal size="sm" variant="primary">New Event</b-btn>
1421
<b-modal id="new-event-modal"
1522
title="New Game Event"
@@ -87,6 +94,16 @@
8794
}
8895
},
8996
},
97+
mounted() {
98+
if (localStorage.gameEventsPerPage) {
99+
this.perPage = parseInt(localStorage.gameEventsPerPage);
100+
}
101+
},
102+
watch: {
103+
perPage(perPage) {
104+
localStorage.gameEventsPerPage = perPage;
105+
}
106+
}
90107
}
91108
</script>
92109

@@ -97,7 +114,7 @@
97114
justify-content: center;
98115
}
99116
100-
.event-controls-container button {
117+
.event-controls-container button, input {
101118
margin-bottom: 1rem;
102119
margin-left: 1rem;
103120
}
@@ -106,4 +123,8 @@
106123
margin-top: 0.2rem;
107124
margin-right: 1rem;
108125
}
126+
127+
input {
128+
text-align: center;
129+
}
109130
</style>

0 commit comments

Comments
 (0)