Frontend: Trim search queries

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-07-20 19:51:23 +02:00
parent a01e54070d
commit 5b2a71bbc8
7 changed files with 7 additions and 0 deletions

View file

@ -272,6 +272,7 @@
}); });
}, },
updateQuery() { updateQuery() {
this.filter.q = this.filter.q.trim();
const len = this.filter.q.length; const len = this.filter.q.length;
if (len > 1 && len < 3) { if (len > 1 && len < 3) {

View file

@ -393,6 +393,7 @@
}); });
}, },
updateQuery() { updateQuery() {
this.filter.q = this.filter.q.trim();
const len = this.filter.q.length; const len = this.filter.q.length;
if (len > 1 && len < 3) { if (len > 1 && len < 3) {

View file

@ -354,6 +354,7 @@
}); });
}, },
updateQuery() { updateQuery() {
this.filter.q = this.filter.q.trim();
const len = this.filter.q.length; const len = this.filter.q.length;
if (len > 1 && len < 3) { if (len > 1 && len < 3) {

View file

@ -117,6 +117,7 @@
}, },
methods: { methods: {
updateQuery() { updateQuery() {
this.filter.q = this.filter.q.trim();
const len = this.filter.q.length; const len = this.filter.q.length;
if (len > 1 && len < 3) { if (len > 1 && len < 3) {

View file

@ -325,6 +325,7 @@
this.lastId = ""; this.lastId = "";
}, },
updateQuery() { updateQuery() {
this.filter.q = this.filter.q.trim();
const len = this.filter.q.length; const len = this.filter.q.length;
if (len > 1 && len < 3) { if (len > 1 && len < 3) {

View file

@ -307,6 +307,7 @@
}); });
}, },
updateQuery() { updateQuery() {
this.filter.q = this.filter.q.trim();
const len = this.filter.q.length; const len = this.filter.q.length;
if (len > 1 && len < 3) { if (len > 1 && len < 3) {

View file

@ -202,6 +202,7 @@
this.search(); this.search();
}, },
updateQuery() { updateQuery() {
this.filter.q = this.filter.q.trim();
const len = this.filter.q.length; const len = this.filter.q.length;
if (len > 1 && len < 3) { if (len > 1 && len < 3) {