Skip to content

Commit

Permalink
Fixed #159 - rowsPerPageOptions dropdown is not coming in Datatable
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed Jan 30, 2020
1 parent 246edd2 commit e3ea89a
Showing 1 changed file with 30 additions and 25 deletions.
55 changes: 30 additions & 25 deletions src/components/paginator/RowsPerPageDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
<template>
<Dropdown :value="rows" :options="rowsOptions" optionLabel="label" optionValue="value"
@input="onChange($event)"></Dropdown>
<RPPDropdown :value="rows" :options="rowsOptions" optionLabel="label" optionValue="value"
@input="onChange($event)"></RPPDropdown>
</template>

<script>
export default {
inheritAttrs: false,
props: {
options: Array,
rows: Number
},
methods: {
onChange(value) {
this.$emit('rows-change', value);
}
},
computed: {
rowsOptions() {
let opts = [];
if (this.options) {
for(let i= 0; i < this.options.length; i++) {
opts.push({label: String(this.options[i]), value: this.options[i]})
}
}
return opts;
}
}
import Dropdown from '../dropdown/Dropdown';
}
export default {
inheritAttrs: false,
props: {
options: Array,
rows: Number
},
methods: {
onChange(value) {
this.$emit('rows-change', value);
}
},
computed: {
rowsOptions() {
let opts = [];
if (this.options) {
for(let i= 0; i < this.options.length; i++) {
opts.push({label: String(this.options[i]), value: this.options[i]})
}
}
return opts;
}
},
components: {
'RPPDropdown': Dropdown
}
}
</script>

0 comments on commit e3ea89a

Please sign in to comment.