diff --git a/frontend/src/components/Books.vue b/frontend/src/components/Books.vue
index 690f217..05eee04 100644
--- a/frontend/src/components/Books.vue
+++ b/frontend/src/components/Books.vue
@@ -24,7 +24,7 @@
{{ success }}
-
+
@@ -123,7 +123,11 @@ export default {
if (filterKey) {
data = data.filter(function (row) {
return Object.keys(row).some(function (key) {
- return String(row[key]).toLowerCase().indexOf(filterKey) > -1
+ if (row[key].content) {
+ return String(row[key].content).toLowerCase().indexOf(filterKey) > -1
+ } else {
+ return String(row[key]).toLowerCase().indexOf(filterKey) > -1
+ }
})
})
}
@@ -164,7 +168,7 @@ export default {
this.loading = false
})
.catch(e => {
- console.log(e)
+ this.loading = false
this.error = e
})
},
@@ -186,8 +190,8 @@ export default {
console.log(e)
})
},
- editBook (id) {
- console.log(id, 'edit')
+ editBook (book) {
+ console.log(book, 'edit')
}
}
}