Skip to content

Commit

Permalink
ui: only show pager when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Dec 6, 2019
1 parent 2b759cb commit cc3b168
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ui/src/views/CollectionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</tr>
</tbody>
</table>
<b-nav inline>
<b-nav inline v-if="showPager">
<b-button-group size="sm">
<b-button class="page-link" :disabled="!showPrev" @click="goHome()">🏠</b-button>
<b-button class="page-link" :disabled="!showPrev" @click="goPrev()">&laquo; Previous</b-button>
Expand Down Expand Up @@ -173,6 +173,13 @@ export default class CollectionList extends Vue {
});
}
private get showPager(): boolean {
if (typeof(this.showPrev) === 'undefined' || typeof(this.showNext) === 'undefined') {
return false;
}
return this.showPrev || this.showNext;
}
private get queryHelp(): string | null {
switch (this.$store.state.collection.query.field) {
case 'name':
Expand Down

0 comments on commit cc3b168

Please sign in to comment.