Add gesture to close the suggested tags

This commit is contained in:
Thomas Ricouard 2024-01-05 19:32:17 +01:00
parent b3af5f1c45
commit a3f29aa15b

View file

@ -161,5 +161,13 @@ struct StatusEditorAutoCompleteView: View {
.padding(.horizontal, .layoutPadding)
}
.frame(height: 200)
.gesture(DragGesture(minimumDistance: 0, coordinateSpace: .local)
.onEnded({ value in
withAnimation {
if value.translation.height > 0 {
isTagSuggestionExpanded = false
}
}
}))
}
}