From c36832586c3b372b4e62502aebe0e7c1d4fa7f7f Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sun, 10 Mar 2024 22:14:46 -0700 Subject: [PATCH] Scoll to dismiss keyboard for the two searchable lists --- Meshtastic/Views/Messages/UserList.swift | 1 + Meshtastic/Views/Nodes/NodeList.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Meshtastic/Views/Messages/UserList.swift b/Meshtastic/Views/Messages/UserList.swift index deab7b0d..978e8c08 100644 --- a/Meshtastic/Views/Messages/UserList.swift +++ b/Meshtastic/Views/Messages/UserList.swift @@ -158,6 +158,7 @@ struct UserList: View { .navigationTitle(String.localizedStringWithFormat("contacts %@".localized, String(users.count == 0 ? 0 : users.count - 1))) .searchable(text: usersQuery, placement: users.count > 10 ? .navigationBarDrawer(displayMode: .always) : .automatic, prompt: "Find a contact") .disableAutocorrection(true) + .scrollDismissesKeyboard(.immediately) } } } diff --git a/Meshtastic/Views/Nodes/NodeList.swift b/Meshtastic/Views/Nodes/NodeList.swift index 81ae069f..c2532ad7 100644 --- a/Meshtastic/Views/Nodes/NodeList.swift +++ b/Meshtastic/Views/Nodes/NodeList.swift @@ -161,6 +161,7 @@ struct NodeList: View { } .searchable(text: $searchState.searchText, placement: nodes.count > 10 ? .navigationBarDrawer(displayMode: .always) : .automatic, prompt: "Find a node") .disableAutocorrection(true) + .scrollDismissesKeyboard(.immediately) .searchScopes($searchState.searchScope) { ForEach(NodeSearchState.SearchScopes.allCases) { scope in Text(scope.title).tag(scope)