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/Sensors/Sensors.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/Sensors/Sensors.vue')
-rw-r--r-- | src/views/Health/Sensors/Sensors.vue | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/views/Health/Sensors/Sensors.vue b/src/views/Health/Sensors/Sensors.vue index 3915ff20..c2343591 100644 --- a/src/views/Health/Sensors/Sensors.vue +++ b/src/views/Health/Sensors/Sensors.vue @@ -6,6 +6,7 @@ <search :placeholder="$t('pageSensors.searchForSensors')" @changeSearch="onChangeSearchInput" + @clearSearch="onClearSearchInput" /> </b-col> <b-col sm="3" md="3" xl="2"> @@ -107,6 +108,7 @@ import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; import TableFilterMixin from '@/components/Mixins/TableFilterMixin'; import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin'; import TableSortMixin from '@/components/Mixins/TableSortMixin'; +import SearchFilterMixin from '@/components/Mixins/SearchFilterMixin'; export default { name: 'Sensors', @@ -124,7 +126,8 @@ export default { BVTableSelectableMixin, LoadingBarMixin, TableDataFormatterMixin, - TableSortMixin + TableSortMixin, + SearchFilterMixin ], data() { return { @@ -215,9 +218,6 @@ export default { onFilterChange({ activeFilters }) { this.activeFilters = activeFilters; }, - onChangeSearchInput(event) { - this.searchFilter = event; - }, onFiltered(filteredItems) { this.searchTotalFilteredRows = filteredItems.length; } |