mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Searching disables the filters (#2530)
This commit is contained in:
@@ -58,7 +58,7 @@ struct EmojiPickerScreen: View {
|
||||
.navigationTitle(L10n.commonReactions)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar { toolbar }
|
||||
.modifier(IsSearching(isSearching: $isSearching))
|
||||
.isSearching($isSearching)
|
||||
.searchable(text: $searchString, placement: .navigationBarDrawer(displayMode: .always))
|
||||
.compoundSearchField()
|
||||
}
|
||||
@@ -87,17 +87,6 @@ struct EmojiPickerScreen: View {
|
||||
}
|
||||
}
|
||||
|
||||
/// A view modifier to extract whether the search field is focussed from a subview.
|
||||
private struct IsSearching: ViewModifier {
|
||||
@Environment(\.isSearching) private var isSearchFieldFocused
|
||||
@Binding var isSearching: Bool
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.onChange(of: isSearchFieldFocused) { isSearching = $0 }
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
struct EmojiPickerScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
Reference in New Issue
Block a user