Open marekkaczkowski opened 7 years ago
@marekkaczkowski
put perPage
in your data function and then add a watcher
https://github.com/ratiw/vue-table/blob/master/examples/semantic.html#L344-L351
<div>
<label>Per Page:</label>
<select class="ui simple dropdown" v-model="perPage">
<option value=10>10</option>
<option value=15>15</option>
<option value=20>20</option>
<option value=25>25</option>
<option value=50>50</option>
<option value=100>100</option>
<option value=250>250</option>
</select>
</div>
</div>
data () {
return {
// [...]
perPage: 10,
}
},
watch: {
'perPage': function(val, oldVal) {
Vue.nextTick( () => this.$refs.vuetable.refresh())
},
}
I figured out that VuetablePaginationDropdown is actually dropdown with pages not a pagination win 'Per page' dropdown :confused: so I'm trying to add little component that will change
perPage
value. I'm changingper_page
inmoreParams
but I feel it's not the right wayCan you give some tips on it? :wink: