mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 08:32:53 +02:00
#1098 - Various changes following code review.
This commit is contained in:
@@ -33,20 +33,18 @@ struct UserSuggestionListWithInput: View {
|
||||
|
||||
var viewModel: UserSuggestionListWithInputViewModel
|
||||
@State private var inputText: String = ""
|
||||
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0.0) {
|
||||
UserSuggestionList(viewModel: viewModel.listViewModel.context)
|
||||
TextField("Search for user", text: $inputText)
|
||||
.background(Color.white)
|
||||
.onChange(of: inputText, perform: { value in
|
||||
viewModel.callback(value)
|
||||
})
|
||||
.border(Color.black)
|
||||
.onChange(of: inputText, perform:viewModel.callback)
|
||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||
.padding([.leading, .trailing])
|
||||
.onAppear(perform: {
|
||||
.onAppear {
|
||||
inputText = "@-" // Make the list show all available mock results
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user