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/views/Health/EventLogs/EventLogs.vue | |
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/views/Health/EventLogs/EventLogs.vue')
-rw-r--r-- | src/views/Health/EventLogs/EventLogs.vue | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/views/Health/EventLogs/EventLogs.vue b/src/views/Health/EventLogs/EventLogs.vue index e7d4895a..cf5d4787 100644 --- a/src/views/Health/EventLogs/EventLogs.vue +++ b/src/views/Health/EventLogs/EventLogs.vue @@ -6,6 +6,7 @@ <search :placeholder="$t('pageEventLogs.table.searchLogs')" @changeSearch="onChangeSearchInput" + @clearSearch="onClearSearchInput" /> </b-col> <b-col sm="3" class="d-flex flex-column justify-content-end"> @@ -161,6 +162,7 @@ import BVTableSelectableMixin from '@/components/Mixins/BVTableSelectableMixin'; import BVToastMixin from '@/components/Mixins/BVToastMixin'; import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin'; import TableSortMixin from '@/components/Mixins/TableSortMixin'; +import SearchFilterMixin from '@/components/Mixins/SearchFilterMixin'; export default { components: { @@ -183,7 +185,8 @@ export default { LoadingBarMixin, TableFilterMixin, TableDataFormatterMixin, - TableSortMixin + TableSortMixin, + SearchFilterMixin ], data() { return { @@ -239,7 +242,6 @@ export default { ], filterStartDate: null, filterEndDate: null, - searchFilter: null, searchTotalFilteredRows: 0 }; }, @@ -353,9 +355,6 @@ export default { this.filterStartDate = fromDate; this.filterEndDate = toDate; }, - onChangeSearchInput(searchValue) { - this.searchFilter = searchValue; - }, onFiltered(filteredItems) { this.searchTotalFilteredRows = filteredItems.length; }, |