Clear-Funktion bei der Suche
This commit is contained in:
parent
9d3d1b707e
commit
f4ab8813f3
@ -101,6 +101,7 @@
|
|||||||
<form class="om-searchbar" @submit.prevent="search()">
|
<form class="om-searchbar" @submit.prevent="search()">
|
||||||
<b-field>
|
<b-field>
|
||||||
<b-autocomplete
|
<b-autocomplete
|
||||||
|
id="searchtext"
|
||||||
rounded
|
rounded
|
||||||
v-model="searchtext"
|
v-model="searchtext"
|
||||||
@keydown.native.enter="search"
|
@keydown.native.enter="search"
|
||||||
@ -128,6 +129,7 @@
|
|||||||
@typing="getFilteredTags"
|
@typing="getFilteredTags"
|
||||||
@input="saveTagsToArray">
|
@input="saveTagsToArray">
|
||||||
</b-taginput>-->
|
</b-taginput>-->
|
||||||
|
<button @click="clear">x</button>
|
||||||
</b-field>
|
</b-field>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -211,8 +213,9 @@
|
|||||||
router,
|
router,
|
||||||
el: '#api',
|
el: '#api',
|
||||||
data: function() {
|
data: function() {
|
||||||
return{
|
return {
|
||||||
searchtext: "",
|
searchtext: "",
|
||||||
|
isSearchActiv: false,
|
||||||
selected: [],
|
selected: [],
|
||||||
taglist: dat,
|
taglist: dat,
|
||||||
};
|
};
|
||||||
@ -229,6 +232,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
search: function() {
|
search: function() {
|
||||||
|
this.isSearchActiv = true;
|
||||||
console.log("Searchtext: " +this.searchtext.replace(/#/g,''));
|
console.log("Searchtext: " +this.searchtext.replace(/#/g,''));
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "api/msg/search/" + this.searchtext.replace(/#/g, ''),
|
url: "api/msg/search/" + this.searchtext.replace(/#/g, ''),
|
||||||
@ -275,7 +279,15 @@
|
|||||||
}).fail(function (e, f, g) {
|
}).fail(function (e, f, g) {
|
||||||
console.log("err: " + e + f + g);
|
console.log("err: " + e + f + g);
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
|
clear: function() {
|
||||||
|
console.log("clear");
|
||||||
|
|
||||||
|
this.isSearchActiv = false;
|
||||||
|
this.searchtext = "";
|
||||||
|
listMessages();
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user