Skip to content

Commit

Permalink
add clear() function call for clear button (#328)
Browse files Browse the repository at this point in the history
* Add clear_search function to only remove search term

Signed-off-by: sjoshi10 <[email protected]>
  • Loading branch information
sjoshi10 authored Aug 24, 2020
1 parent 37b407b commit 8fae50c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/views/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
label="Search"
v-model="search_term"
clearable
@click:clear="clear_search()"
class="mx-2"
/>

Expand Down Expand Up @@ -317,6 +318,10 @@ export default class Results extends ResultsProps {
this.tree_filters = [];
}
clear_search() {
this.search_term = '';
}
/**
* Returns true if we can currently clear.
* Essentially, just controls whether the button is available
Expand Down

0 comments on commit 8fae50c

Please sign in to comment.