Skip to content

Commit

Permalink
Add the ability to set the TextView's KeyboardDismissMode
Browse files Browse the repository at this point in the history
  • Loading branch information
ejensen committed Oct 14, 2020
1 parent e9bf783 commit fd16b74
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/TextView/TextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public struct TextView: View {
private let contentType: ContentType?
private let autocorrection: Autocorrection
private let autocapitalization: Autocapitalization
private let keyboardDismissMode: UIScrollView.KeyboardDismissMode
private let isSecure: Bool
private let isEditable: Bool
private let isSelectable: Bool
Expand All @@ -69,6 +70,7 @@ public struct TextView: View {
contentType: ContentType?,
autocorrection: Autocorrection,
autocapitalization: Autocapitalization,
keyboardDismissMode: UIScrollView.KeyboardDismissMode,
isSecure: Bool,
isEditable: Bool,
isSelectable: Bool,
Expand All @@ -90,6 +92,7 @@ public struct TextView: View {
self.contentType = contentType
self.autocorrection = autocorrection
self.autocapitalization = autocapitalization
self.keyboardDismissMode = keyboardDismissMode
self.isSecure = isSecure
self.isEditable = isEditable
self.isSelectable = isSelectable
Expand Down Expand Up @@ -131,6 +134,7 @@ public struct TextView: View {
textView.textContentType = contentType
textView.autocorrectionType = autocorrection
textView.autocapitalizationType = autocapitalization
textView.keyboardDismissMode = keyboardDismissMode
textView.isSecureTextEntry = isSecure
textView.isEditable = isEditable
textView.isSelectable = isSelectable
Expand Down Expand Up @@ -178,6 +182,7 @@ public struct TextView: View {
private let contentType: ContentType?
private let autocorrection: Autocorrection
private let autocapitalization: Autocapitalization
private let keyboardDismissMode: UIScrollView.KeyboardDismissMode
private let isSecure: Bool
private let isEditable: Bool
private let isSelectable: Bool
Expand All @@ -204,6 +209,7 @@ public struct TextView: View {
contentType: ContentType? = nil,
autocorrection: Autocorrection = .default,
autocapitalization: Autocapitalization = .sentences,
keyboardDismissMode: UIScrollView.KeyboardDismissMode = .none,
isSecure: Bool = false,
isEditable: Bool = true,
isSelectable: Bool = true,
Expand All @@ -230,6 +236,7 @@ public struct TextView: View {
self.contentType = contentType
self.autocorrection = autocorrection
self.autocapitalization = autocapitalization
self.keyboardDismissMode = keyboardDismissMode
self.isSecure = isSecure
self.isEditable = isEditable
self.isSelectable = isSelectable
Expand Down Expand Up @@ -257,6 +264,7 @@ public struct TextView: View {
contentType: contentType,
autocorrection: autocorrection,
autocapitalization: autocapitalization,
keyboardDismissMode: keyboardDismissMode,
isSecure: isSecure,
isEditable: isEditable,
isSelectable: isSelectable,
Expand Down

0 comments on commit fd16b74

Please sign in to comment.