hide search bar by clicking search icon
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</f7-link>
|
||||
</f7-nav-title>
|
||||
<f7-nav-right class="navbar-compact-icons">
|
||||
<f7-link icon-f7="search" @click="showSearchbar = true"></f7-link>
|
||||
<f7-link icon-f7="search" @click="toggleSearchbar"></f7-link>
|
||||
<f7-link icon-f7="plus" :class="{ 'disabled': !canAddTransaction }" @click="add"></f7-link>
|
||||
</f7-nav-right>
|
||||
|
||||
@@ -1300,6 +1300,18 @@ function filterMultipleTags(): void {
|
||||
props.f7router.navigate('/settings/filter/tag?type=transactionListCurrent');
|
||||
}
|
||||
|
||||
function toggleSearchbar(): void {
|
||||
if (!showSearchbar.value) {
|
||||
showSearchbar.value = true;
|
||||
} else {
|
||||
showSearchbar.value = false;
|
||||
|
||||
if (query.value.keyword) {
|
||||
changeKeywordFilter('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function changeKeywordFilter(keyword: string): void {
|
||||
if (query.value.keyword === keyword) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user