:case insensitive and litte changes
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
@@ -44,8 +44,6 @@ Vue.mixin({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
Vue.prototype.$OC = OC
|
|
||||||
|
|
||||||
Vue.directive('tooltip', Tooltip)
|
Vue.directive('tooltip', Tooltip)
|
||||||
Vue.directive('click-outside', ClickOutside)
|
Vue.directive('click-outside', ClickOutside)
|
||||||
|
|
||||||
@@ -61,7 +59,8 @@ new Vue({
|
|||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
this.$OC.Search = new OCA.Search(this.filter, this.cleanSearch)
|
// eslint-disable-next-line
|
||||||
|
new OCA.Search(this.filter, this.cleanSearch)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
filter(query) {
|
filter(query) {
|
||||||
|
|||||||
@@ -31,11 +31,8 @@ export default {
|
|||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
cardsByStack: (state, getters) => (id) => {
|
cardsByStack: (state, getters) => (id) => {
|
||||||
return state.cards.filter(
|
return state.cards.filter((card) => card.stackId === id && (getters.getSearchQuery === '' || (card.title.toLowerCase().includes(getters.getSearchQuery.toLowerCase()) || card.description.toLowerCase().includes(getters.getSearchQuery.toLowerCase())))
|
||||||
(card) => card.stackId === id
|
).sort((a, b) => a.order - b.order)
|
||||||
&& (card.title.includes(getters.getSearchQuery) || card.description.includes(getters.getSearchQuery))
|
|
||||||
)
|
|
||||||
.sort((a, b) => a.order - b.order)
|
|
||||||
},
|
},
|
||||||
cardById: state => (id) => {
|
cardById: state => (id) => {
|
||||||
return state.cards.find((card) => card.id === id)
|
return state.cards.find((card) => card.id === id)
|
||||||
|
|||||||
Reference in New Issue
Block a user