File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 <h3 style =" margin-top : 0 ;" >Your Collections: </h3 >
88 <button @click =" newCollection" class =" button warning full-width" >New Collection</button >
99 </div >
10- <div class =" collection" v-for =" collection in collections" :key =" collection.key" >
10+ <div @click = " filterBy(collection) " class =" collection" v-for =" collection in collections" :key =" collection.key" >
1111 <hr class =" collection-rule" >
1212 <div class =" fab-container" >
1313 <h5 >{{collection.name}}</h5 >
@@ -113,7 +113,8 @@ export default {
113113 collectionsOpen: false ,
114114 addToCollectionModal: false ,
115115 addDoc: false ,
116- collectionToAdd: null
116+ collectionToAdd: null ,
117+ collectionFilter: false
117118 }),
118119 created () {
119120 document .title = ` Graphite Writer BETA v${
@@ -205,11 +206,17 @@ export default {
205206 .includes (query);
206207 }
207208 };
208- return result .filter (filter);
209+ if (this .collectionFilter ) {
210+ } else {
211+ return result .filter (filter);
212+ }
209213 }
210214 }
211215 },
212216 methods: {
217+ filterBy (collection ) {
218+ this .collectionFilter = collection .key ;
219+ },
213220 addDocToCollection () {
214221 let docId = this .addDoc .userData .key ;
215222 let userId = this .addDoc .userData .uid ;
You can’t perform that action at this time.
0 commit comments