From b380dcfca648f06860743d9af47c27655c42fe96 Mon Sep 17 00:00:00 2001 From: Praneet Loke Date: Thu, 16 Feb 2017 10:53:09 -0800 Subject: [PATCH] refactor property names to make more sense #517 (#521) * Added watchers on mdTotal and mdPage. Changed the binding for the disabled attribute of the next page arrow to use a computed property. Fix issue #482. * Improve code readability for the fix done for #482. --- src/components/mdTable/mdTablePagination.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/mdTable/mdTablePagination.vue b/src/components/mdTable/mdTablePagination.vue index f31fe4b..3dd2e66 100644 --- a/src/components/mdTable/mdTablePagination.vue +++ b/src/components/mdTable/mdTablePagination.vue @@ -12,7 +12,7 @@ keyboard_arrow_left - + keyboard_arrow_right @@ -56,17 +56,17 @@ this.totalItems = isNaN(val) ? Number.MAX_SAFE_INTEGER : parseInt(val, 10); }, mdSize(val) { - this.currentSize = parseInt(this.mdSize, 10); + this.currentSize = parseInt(val, 10); }, mdPage(val) { - this.currentPage = parseInt(this.mdPage, 10); + this.currentPage = parseInt(val, 10); } }, computed: { lastPage() { return false; }, - hasMoreItems() { + shouldDisable() { return this.currentSize * this.currentPage >= this.totalItems; } },