From b49a04869a3d2bf2835f0fc9af6ea8ac4e5f00fb Mon Sep 17 00:00:00 2001 From: Joe Wroten Date: Tue, 16 May 2017 05:39:54 -0500 Subject: [PATCH] Consolidated pagination --- src/components/Spelllist.vue | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/Spelllist.vue b/src/components/Spelllist.vue index 5527e4b..4a87373 100644 --- a/src/components/Spelllist.vue +++ b/src/components/Spelllist.vue @@ -7,7 +7,7 @@ @@ -33,18 +33,11 @@ export default { } }, computed: { - dynamicSortBy () { - return this.search.length >= 3 ? 'sortScore' : this.sortBy - }, - pagedSpells () { - return new Query(this.filteredSpells) - .paginate(1, this.loadedPage * 20) - .results - }, filteredSpells () { return new Query(this.spells) - .search('name', this.search, 5) + .search('name', this.search) .sort(this.sortBy) + .paginate(1, this.loadedPage * 20) .results } },