diff --git a/src/components/TableSection.vue b/src/components/TableSection.vue
index 1ac2aab..2ca18ed 100644
--- a/src/components/TableSection.vue
+++ b/src/components/TableSection.vue
@@ -4,10 +4,10 @@
{{currentMaster.name}}
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+ :filterIncludedFields="filterOn"
+ :current-page="currentPage"
+ :per-page="perPage"
+ @filtered="onFiltered">
{{ data.value.toFixed(2) }}%
@@ -82,6 +117,10 @@ export default {
sortBy: 'task_percentage',
filter: null,
filterOn: [],
+ perPage: 15,
+ pageOptions: [10, 15, 25],
+ totalRows: 1,
+ currentPage: 1,
fields: [
{
key: 'id',
@@ -164,6 +203,9 @@ export default {
//handle removal list
this.filtered_items = _.filter(this.filtered_items, function(monster){ return !removeIds.includes(parseInt(monster.id)) } );
+
+ //recalculate row length
+ this.totalRows = this.filtered_items.length
},
generateTaskWeights() {
//calculate total weight
@@ -176,6 +218,10 @@ export default {
item.task_percentage = item.taskweight / this.total_weight * 100;
})
},
+ onFiltered(filteredItems) {
+ this.totalRows = filteredItems.length
+ this.currentPage = 1
+ }
},
created() {
this.reload();