Add search bar for collections (#1260)

Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
This commit is contained in:
Jeff Sieu
2020-10-11 12:52:18 +08:00
committed by GitHub
parent 054f27083b
commit 194a4f3adb
3 changed files with 62 additions and 7 deletions

View File

@@ -2,8 +2,8 @@
<div>
<div class="row-wrapper">
<button class="icon" @click="toggleShowChildren">
<i class="material-icons" v-show="!showChildren">arrow_right</i>
<i class="material-icons" v-show="showChildren">arrow_drop_down</i>
<i class="material-icons" v-show="!showChildren && !isFiltered">arrow_right</i>
<i class="material-icons" v-show="showChildren || isFiltered">arrow_drop_down</i>
<folderIcon class="material-icons" />
<span>{{ collection.name }}</span>
</button>
@@ -44,7 +44,7 @@
</div>
</div>
<div v-show="showChildren">
<div v-show="showChildren || isFiltered">
<ul class="flex-col">
<li
v-for="(folder, index) in collection.folders"
@@ -56,6 +56,7 @@
:folderIndex="index"
:collection-index="collectionIndex"
:doc="doc"
:isFiltered="isFiltered"
@edit-folder="editFolder(collectionIndex, folder, index)"
@edit-request="$emit('edit-request', $event)"
/>
@@ -105,6 +106,7 @@ export default {
collectionIndex: Number,
collection: Object,
doc: Boolean,
isFiltered: Boolean,
},
data() {
return {