Skip to content

Commit 02a8a47

Browse files
committed
Pagination in tables
1 parent d9ab9af commit 02a8a47

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import Component from '@ember/component';
2+
import { computed } from '@ember/object';
3+
export default Component.extend({
4+
currentRange: computed(function() {
5+
return '1-10';
6+
}),
7+
pageCount: computed(function() {
8+
9+
}),
10+
actions: {
11+
moveToNextPage() {
12+
console.log('hello');
13+
this.incrementProperty('currentPage');
14+
},
15+
moveToPreviousPage() {
16+
console.log('pevious');
17+
this.decrementProperty('currentPage');
18+
}
19+
},
20+
totalCount: 100
21+
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="ui secondary menu">
2+
<div class="ui secondary mini labeled icon compact menu">
3+
<a class="item" {{action 'moveToPreviousPage'}}>
4+
<i class="caret left icon"></i>
5+
Previous
6+
</a>
7+
<a class="item" {{action 'moveToNextPage'}}>
8+
<i class="caret right icon"></i>
9+
Next
10+
</a>
11+
</div>
12+
<div class="ui text right padded menu">
13+
Showing {{currentRange}} of {{totalCount}} entries
14+
</div>
15+
</div>
16+

0 commit comments

Comments
 (0)