Update page limit to use vue loop

This commit is contained in:
howdu 2020-12-23 09:58:32 +00:00
parent 7ca57d4ab3
commit 4a1562ddc8
1 changed files with 6 additions and 5 deletions

View File

@ -101,11 +101,7 @@
<select id="perPage" name="perPage" class="control" v-model="perPage"
v-on:change="paginate">
<option value="10"> 10</option>
<option value="20"> 20</option>
<option value="30"> 30</option>
<option value="40"> 40</option>
<option value="50"> 50</option>
<option v-for="index in this.perPageProduct" :key="index" :value="index"> @{{ index }} </option>
</select>
</div>
</div>
@ -307,6 +303,7 @@
numberConditionSelect: false,
datetimeConditionSelect: false,
perPage: {{ $results['itemsPerPage'] ?: 10 }},
perPageProduct: [10, 20, 30, 40, 50],
extraFilters: @json($results['extraFilters']),
}
},
@ -321,6 +318,10 @@
}
}
}
if (this.perPageProduct.indexOf(parseInt(this.perPage)) === -1) {
this.perPageProduct.unshift(this.perPage);
}
},
methods: {