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"/>
|
<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)"/>
|
<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"/>
|
<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>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
rowsChange(event) {
|
rowsChange(event) {
|
||||||
this.changePage(0, event.value);
|
this.changePage(0, event.value.code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<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>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
@ -16,11 +16,14 @@
|
||||||
computed: {
|
computed: {
|
||||||
rowOptions() {
|
rowOptions() {
|
||||||
var newOption = []
|
var newOption = []
|
||||||
for(var i= 0; i<this.options.length; i++) {
|
if(this.options) {
|
||||||
newOption.push({label: String(this.options[i]), code: this.options[i]})
|
for(var i= 0; i<this.options.length; i++) {
|
||||||
|
newOption.push({name: String(this.options[i]), code: this.options[i]})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return newOption;
|
return newOption;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<div class="content-section implementation">
|
<div class="content-section implementation">
|
||||||
<h3 class="first">Default</h3>
|
<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>
|
<h3 class="first">Custom Template</h3>
|
||||||
<Paginator :first="first2" :rows="rows2" :totalRecords="120" @change="onPageChange2($event)" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"></Paginator>
|
<Paginator :first="first2" :rows="rows2" :totalRecords="120" @change="onPageChange2($event)" template="FirstPageLink PrevPageLink CurrentPageReport NextPageLink LastPageLink"></Paginator>
|
||||||
|
|
Loading…
Reference in New Issue