Skip to content

Commit

Permalink
Fixed #247 - JumpToPageDropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
cagataycivici committed May 12, 2021
1 parent 81c73c5 commit 0728aaa
Show file tree
Hide file tree
Showing 41 changed files with 140,028 additions and 102,171 deletions.
6,794 changes: 3,921 additions & 2,873 deletions public/themes/arya-blue/theme.css

Large diffs are not rendered by default.

6,794 changes: 3,921 additions & 2,873 deletions public/themes/arya-green/theme.css

Large diffs are not rendered by default.

6,794 changes: 3,921 additions & 2,873 deletions public/themes/arya-orange/theme.css

Large diffs are not rendered by default.

6,794 changes: 3,921 additions & 2,873 deletions public/themes/arya-purple/theme.css

Large diffs are not rendered by default.

6,782 changes: 3,916 additions & 2,866 deletions public/themes/bootstrap4-dark-blue/theme.css

Large diffs are not rendered by default.

6,782 changes: 3,916 additions & 2,866 deletions public/themes/bootstrap4-dark-purple/theme.css

Large diffs are not rendered by default.

6,794 changes: 3,922 additions & 2,872 deletions public/themes/bootstrap4-light-blue/theme.css

Large diffs are not rendered by default.

6,794 changes: 3,922 additions & 2,872 deletions public/themes/bootstrap4-light-purple/theme.css

Large diffs are not rendered by default.

6,909 changes: 3,994 additions & 2,915 deletions public/themes/fluent-light/theme.css

Large diffs are not rendered by default.

6,678 changes: 3,856 additions & 2,822 deletions public/themes/luna-amber/theme.css

Large diffs are not rendered by default.

6,694 changes: 3,864 additions & 2,830 deletions public/themes/luna-blue/theme.css

Large diffs are not rendered by default.

6,694 changes: 3,864 additions & 2,830 deletions public/themes/luna-green/theme.css

Large diffs are not rendered by default.

6,678 changes: 3,856 additions & 2,822 deletions public/themes/luna-pink/theme.css

Large diffs are not rendered by default.

8,254 changes: 4,792 additions & 3,462 deletions public/themes/md-dark-deeppurple/theme.css

Large diffs are not rendered by default.

8,254 changes: 4,792 additions & 3,462 deletions public/themes/md-dark-indigo/theme.css

Large diffs are not rendered by default.

8,244 changes: 4,787 additions & 3,457 deletions public/themes/md-light-deeppurple/theme.css

Large diffs are not rendered by default.

8,244 changes: 4,787 additions & 3,457 deletions public/themes/md-light-indigo/theme.css

Large diffs are not rendered by default.

8,262 changes: 4,796 additions & 3,466 deletions public/themes/mdc-dark-deeppurple/theme.css

Large diffs are not rendered by default.

8,262 changes: 4,796 additions & 3,466 deletions public/themes/mdc-dark-indigo/theme.css

Large diffs are not rendered by default.

8,254 changes: 4,792 additions & 3,462 deletions public/themes/mdc-light-deeppurple/theme.css

Large diffs are not rendered by default.

8,254 changes: 4,792 additions & 3,462 deletions public/themes/mdc-light-indigo/theme.css

Large diffs are not rendered by default.

6,717 changes: 3,878 additions & 2,839 deletions public/themes/nova-accent/theme.css

Large diffs are not rendered by default.

6,718 changes: 3,879 additions & 2,839 deletions public/themes/nova-alt/theme.css

Large diffs are not rendered by default.

6,716 changes: 3,877 additions & 2,839 deletions public/themes/nova-vue/theme.css

Large diffs are not rendered by default.

6,712 changes: 3,875 additions & 2,837 deletions public/themes/nova/theme.css

Large diffs are not rendered by default.

6,745 changes: 3,890 additions & 2,855 deletions public/themes/rhea/theme.css

Large diffs are not rendered by default.

6,837 changes: 3,942 additions & 2,895 deletions public/themes/saga-blue/theme.css

Large diffs are not rendered by default.

6,837 changes: 3,942 additions & 2,895 deletions public/themes/saga-green/theme.css

Large diffs are not rendered by default.

6,827 changes: 3,937 additions & 2,890 deletions public/themes/saga-orange/theme.css

Large diffs are not rendered by default.

6,825 changes: 3,936 additions & 2,889 deletions public/themes/saga-purple/theme.css

Large diffs are not rendered by default.

6,802 changes: 3,925 additions & 2,877 deletions public/themes/vela-blue/theme.css

Large diffs are not rendered by default.

6,802 changes: 3,925 additions & 2,877 deletions public/themes/vela-green/theme.css

Large diffs are not rendered by default.

6,802 changes: 3,925 additions & 2,877 deletions public/themes/vela-orange/theme.css

Large diffs are not rendered by default.

6,802 changes: 3,925 additions & 2,877 deletions public/themes/vela-purple/theme.css

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions src/components/paginator/JumpToPageDropdown.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<JTPDropdown :modelValue="page" :options="pageOptions" optionLabel="label" optionValue="value"
@update:modelValue="onChange($event)" class="p-paginator-page-options"></JTPDropdown>
</template>

<script>
import Dropdown from 'primevue/dropdown';
export default {
name: 'JumpToPageDropdown',
inheritAttrs: false,
emits: ['page-change'],
props: {
page: Number,
pageCount: Number
},
methods: {
onChange(value) {
this.$emit('page-change', value);
}
},
computed: {
pageOptions() {
let opts = [];
for(let i= 0; i < this.pageCount; i++) {
opts.push({label: String(i), value: i})
}
return opts;
}
},
components: {
'JTPDropdown': Dropdown
}
}
</script>
4 changes: 4 additions & 0 deletions src/components/paginator/Paginator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
:page="page" :pageCount="pageCount" :first="d_first" :rows="d_rows" :totalRecords="totalRecords" />
<RowsPerPageDropdown v-else-if="item === 'RowsPerPageDropdown' && rowsPerPageOptions" :rows="d_rows"
:options="rowsPerPageOptions" @rows-change="onRowChange($event)" />
<JumpToPageDropdown v-else-if="item === 'JumpToPageDropdown'" :page="page" :pageCount="pageCount"
@page-change="changePage($event)" />
</template>
<div class="p-paginator-right-content" v-if="$slots.right">
<slot name="right" :state="currentState"></slot>
Expand All @@ -28,6 +30,7 @@ import NextPageLink from './NextPageLink.vue';
import PageLinks from './PageLinks.vue';
import PrevPageLink from './PrevPageLink.vue';
import RowsPerPageDropdown from './RowsPerPageDropdown.vue';
import JumpToPageDropdown from './JumpToPageDropdown.vue';
export default {
name: 'Paginator',
Expand Down Expand Up @@ -196,6 +199,7 @@ export default {
'PageLinks': PageLinks,
'PrevPageLink': PrevPageLink,
'RowsPerPageDropdown': RowsPerPageDropdown,
'JumpToPageDropdown': JumpToPageDropdown
}
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/components/paginator/RowsPerPageDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<RPPDropdown :modelValue="rows" :options="rowsOptions" optionLabel="label" optionValue="value"
@update:modelValue="onChange($event)"></RPPDropdown>
@update:modelValue="onChange($event)" class="p-paginator-rpp-options"></RPPDropdown>
</template>

<script>
Expand Down
2 changes: 1 addition & 1 deletion src/views/datatable/DataTableDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ export default {
<td>paginatorTemplate</td>
<td>string</td>
<td>FirstPageLink PrevPageLink PageLinks <br /> NextPageLink LastPageLink RowsPerPageDropdown</td>
<td>Template of the paginator.</td>
<td>Template of the paginator. See the <router-link to="/paginator">Paginator</router-link> for all available options.</td>
</tr>
<tr>
<td>pageLinkSize</td>
Expand Down
2 changes: 1 addition & 1 deletion src/views/dataview/DataViewDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export default {
<td>paginatorTemplate</td>
<td>string</td>
<td>FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown</td>
<td>Template of the paginator.</td>
<td>Template of the paginator. See the <router-link to="/paginator">Paginator</router-link> for all available options.</td>
</tr>
<tr>
<td>pageLinkSize</td>
Expand Down
1 change: 1 addition & 0 deletions src/views/paginator/PaginatorDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import Paginator from 'primevue/paginator';
<li>NextPageLink</li>
<li>LastPageLink</li>
<li>RowsPerPageDropdown</li>
<li>JumpToPageDropdown</li>
<li>CurrentPageReport</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion src/views/treetable/TreeTableDoc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ export default {
<td>paginatorTemplate</td>
<td>string</td>
<td>FirstPageLink PrevPageLink PageLinks <br /> NextPageLink LastPageLink RowsPerPageDropdown</td>
<td>Template of the paginator.</td>
<td>Template of the paginator. See the <router-link to="/paginator">Paginator</router-link> for all available options.</td>
</tr>
<tr>
<td>pageLinkSize</td>
Expand Down

0 comments on commit 0728aaa

Please sign in to comment.