Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overlap between search bar and scroll view #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions dime/Views/LogView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -638,16 +638,7 @@ struct SearchView: View {
@State var searchQuery = ""

var body: some View {
ZStack(alignment: .top) {
ScrollView {
if searchQuery == "" {
EmptyView()
} else {
FilteredSearchView(searchQuery: searchQuery)
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)

VStack(spacing: 18) {
HStack(spacing: 9) {
HStack {
Image(systemName: "magnifyingglass")
Expand Down Expand Up @@ -692,6 +683,15 @@ struct SearchView: View {
// .font(.system(size: 18, weight: .medium, design: .rounded))
}
}

ScrollView {
if searchQuery == "" {
EmptyView()
} else {
FilteredSearchView(searchQuery: searchQuery)
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
}
.padding(15)
.background(Color.PrimaryBackground)
Expand Down Expand Up @@ -729,7 +729,6 @@ struct FilteredSearchView: View {
ListView(transactions: _transactions)
}
.frame(maxHeight: .infinity)
.padding(.top, 80)
}

init(searchQuery: String) {
Expand Down