Row option added to paginator
parent
50d239af65
commit
8eab7184d1
|
@ -7,7 +7,7 @@
|
|||
<LastPageLink v-if="item === 'LastPageLink'" :key="i" @click="changePageToLast($event)" :disabled="isLastPage"/>
|
||||
<PageLinks v-if="item === 'PageLinks'" :key="i" :value="updatePageLinks" :page="page" @click="pageLinkClick($event)"/>
|
||||
<CurrentPageReport v-if="item === 'CurrentPageReport'" :key="i" :template="currentPageReportTemplate" :page="page" :pageCount="pageCount"/>
|
||||
<!--<RowsPerPageDropdown v-if="item === 'RowsPerPageDropdown'" :key="i" :value="rows" :options="rowsPerPageOptions" @change="rowsChange($event)"/>-->
|
||||
<RowsPerPageDropdown v-if="item === 'RowsPerPageDropdown'" :key="i" :value="rows" :options="rowsPerPageOptions" @rowsChange="rowsChange($event)"/>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -151,7 +151,7 @@
|
|||
},
|
||||
|
||||
rowsChange(event) {
|
||||
this.changePage(0, event.value);
|
||||
this.changePage(0, event.value.code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<Dropdown :value="value" v-model="selectedRow" :options="rowOptions" optionLabel="label" @change="$emit('change',$event)"></Dropdown>
|
||||
<Dropdown v-model="selectedRow" :options="rowOptions" optionLabel="name" @change="$emit('rowsChange',$event)" :placeholder="String(value)"></Dropdown>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
|
@ -16,11 +16,14 @@
|
|||
computed: {
|
||||
rowOptions() {
|
||||
var newOption = []
|
||||
for(var i= 0; i<this.options.length; i++) {
|
||||
newOption.push({label: String(this.options[i]), code: this.options[i]})
|
||||
if(this.options) {
|
||||
for(var i= 0; i<this.options.length; i++) {
|
||||
newOption.push({name: String(this.options[i]), code: this.options[i]})
|
||||
}
|
||||
}
|
||||
return newOption;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<div class="content-section implementation">
|
||||
<h3 class="first">Default</h3>
|
||||
<Paginator :first="first" :rows="rows" :totalRecords="120" @change="onPageChange($event)"></Paginator>
|
||||
<Paginator :first="first" :rows="rows" :totalRecords="120" @change="onPageChange($event)" :rowsPerPageOptions="[10,20,30]"></Paginator>
|
||||
|
||||
<h3 class="first">Custom Template</h3>
|
||||
<Paginator :first="first2" :rows="rows2" :totalRecords="120" @change="onPageChange2($event)" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"></Paginator>
|
||||
|
|
Loading…
Reference in New Issue