Selaa lähdekoodia

:bug: remove search watch | reset search term with watch | #193

tags/1.0.0^2
J 3 vuotta sitten
vanhempi
commit
16a5480d31
1 muutettua tiedostoa jossa 4 lisäystä ja 5 poistoa
  1. 4
    5
      vue-theme/src/pages/list.vue

+ 4
- 5
vue-theme/src/pages/list.vue Näytä tiedosto

@@ -240,13 +240,12 @@ export default {
240 240
             // Ignore some types with presorts so the sortBy watcher can handle them
241 241
             const ignore = ['artist', 'event', 'exibition']
242 242
             if(ignore.includes(newType)) return
243
+            // Reset the search term betweem loads
244
+            // so we initPostList() works correctly when 
245
+            // navigating from search result to a type list page
246
+            this.searchTerm = this.$route.query.s
243 247
             this.initPostList()
244 248
         },
245
-        isSearch(newTerm, oldTerm) {
246
-            if(!newTerm && oldTerm) {
247
-                this.initPostList()
248
-            }
249
-        },
250 249
         // Fires when navigating between pages with different sorts
251 250
         sortBy(newSort) {
252 251
             // console.log('sort changed :', newSort)

Loading…
Peruuta
Tallenna