From 56fe350104a415b2e0dc7669ed86ca9afa476ac8 Mon Sep 17 00:00:00 2001 From: advplyr Date: Mon, 16 Jan 2023 17:44:32 -0600 Subject: [PATCH] Update:Search input clearable #509 --- components/ui/TextInput.vue | 9 ++++++++- pages/search.vue | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/ui/TextInput.vue b/components/ui/TextInput.vue index 09480e23..7402259e 100644 --- a/components/ui/TextInput.vue +++ b/components/ui/TextInput.vue @@ -4,6 +4,9 @@
{{ prependIcon }}
+
+ close +
@@ -26,7 +29,8 @@ export default { prependIcon: { type: String, default: null - } + }, + clearable: Boolean }, data() { return {} @@ -53,6 +57,9 @@ export default { } }, methods: { + clear() { + this.input = '' + }, focus() { if (this.$refs.input) { this.$refs.input.focus() diff --git a/pages/search.vue b/pages/search.vue index 4c6cf971..f7f747f4 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -1,7 +1,7 @@