|
|
@@ -102,7 +102,8 @@ |
|
|
|
<b-autocomplete |
|
|
|
rounded |
|
|
|
v-model="searchtext" |
|
|
|
:data="getFilteredTags" |
|
|
|
@keydown.native.enter="search" |
|
|
|
:data="filteredDataArray" |
|
|
|
placeholder="suche..." |
|
|
|
icon="magnify" |
|
|
|
@select="option => selected = option"> |
|
|
@@ -205,16 +206,26 @@ |
|
|
|
el: '#api', |
|
|
|
data: function() { |
|
|
|
return{ |
|
|
|
searchtext: "ipsum", |
|
|
|
searchtext: "", |
|
|
|
selected: [], |
|
|
|
taglist: dat, |
|
|
|
}; |
|
|
|
}, |
|
|
|
computed:{ |
|
|
|
filteredDataArray() { |
|
|
|
return this.taglist.filter((option) => { |
|
|
|
return option |
|
|
|
.toString() |
|
|
|
.toLowerCase() |
|
|
|
.indexOf(this.searchtext.toLowerCase()) >= 0 |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
search: function() { |
|
|
|
console.log("Searchtext: " +this.searchtext + tagArray); |
|
|
|
console.log("Searchtext: " +this.searchtext.replace(/#/g,'')); |
|
|
|
$.ajax({ |
|
|
|
url: "api/msg/search/" + this.searchtext, |
|
|
|
url: "api/msg/search/" + this.searchtext.replace(/#/g, ''), |
|
|
|
method: "GET" |
|
|
|
}).done(jd => { |
|
|
|
// NICHT SO wg. Vue: _messagelist = jd; |
|
|
@@ -230,7 +241,7 @@ |
|
|
|
console.log("searching: err: " + e + f + g); |
|
|
|
}) |
|
|
|
}, |
|
|
|
getFilteredTags(text) { |
|
|
|
getFilteredTags(text) { |
|
|
|
this.taglist = dat.filter((option) => { |
|
|
|
return option |
|
|
|
.toString() |