diff options
author | Dixsie Wolmers <dixsie@ibm.com> | 2020-09-08 05:26:06 +0300 |
---|---|---|
committer | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-09-24 17:12:56 +0300 |
commit | 9b22b49232da67bd15e04193006ce881a93265c0 (patch) | |
tree | 225021b7ee961afa0e8a66f4d38b482ae1578d22 /src/components/Mixins | |
parent | 46f17ef6c368d0412352c3026aa1e4ce9fae2e87 (diff) | |
download | webui-vue-9b22b49232da67bd15e04193006ce881a93265c0.tar.xz |
Add table search filter clear button
- Adds ability to quickly clear a table input search field
- Uses similar styling to password toggle icon and datepicker
- Button style to be addressed in separate commit to match
style guide
Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: I18f2e01c28c00c7e7b2ad1af924070241caf36a5
Diffstat (limited to 'src/components/Mixins')
-rw-r--r-- | src/components/Mixins/SearchFilterMixin.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/Mixins/SearchFilterMixin.js b/src/components/Mixins/SearchFilterMixin.js new file mode 100644 index 00000000..856975dc --- /dev/null +++ b/src/components/Mixins/SearchFilterMixin.js @@ -0,0 +1,17 @@ +const SearchFilterMixin = { + data() { + return { + searchFilter: null + }; + }, + methods: { + onChangeSearchInput(searchValue) { + this.searchFilter = searchValue; + }, + onClearSearchInput() { + this.searchFilter = null; + } + } +}; + +export default SearchFilterMixin; |