update SwiftUI-Introspect

This commit is contained in:
Toni Förster
2024-09-11 20:24:03 +02:00
parent 8596ee8811
commit 7e02b08933
4 changed files with 29 additions and 29 deletions

View File

@@ -9,7 +9,7 @@ struct FocusableSearchTextField: View {
var body: some View {
SearchTextField()
#if os(macOS)
.introspect(.textField, on: .macOS(.v12, .v13, .v14)) { textField in
.introspect(.textField, on: .macOS(.v12, .v13, .v14, .v15)) { textField in
state.textField = textField
}
.onAppear {
@@ -18,7 +18,7 @@ struct FocusableSearchTextField: View {
}
}
#elseif os(iOS)
.introspect(.textField, on: .iOS(.v15, .v16, .v17)) { textField in
.introspect(.textField, on: .iOS(.v15, .v16, .v17, .v18)) { textField in
state.textField = textField
}
.onChange(of: state.focused) { newValue in