From f4ab8813f3ad2350f6666d95b29c632bddf33ad3 Mon Sep 17 00:00:00 2001 From: Xenia Date: Tue, 9 Jul 2019 11:36:54 +0200 Subject: [PATCH] Clear-Funktion bei der Suche --- public/index.html | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/public/index.html b/public/index.html index 226d315..b77f044 100644 --- a/public/index.html +++ b/public/index.html @@ -101,6 +101,7 @@ @@ -211,8 +213,9 @@ router, el: '#api', data: function() { - return{ + return { searchtext: "", + isSearchActiv: false, selected: [], taglist: dat, }; @@ -229,6 +232,7 @@ }, methods: { search: function() { + this.isSearchActiv = true; console.log("Searchtext: " +this.searchtext.replace(/#/g,'')); $.ajax({ url: "api/msg/search/" + this.searchtext.replace(/#/g, ''), @@ -274,8 +278,16 @@ } }).fail(function (e, f, g) { console.log("err: " + e + f + g); - }); - } + }); + }, + + clear: function() { + console.log("clear"); + + this.isSearchActiv = false; + this.searchtext = ""; + listMessages(); + }, }, mounted: function () {