Skip to content

Commit

Permalink
Fixed auto focus issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kishanraja committed May 6, 2021
1 parent 9c8ab96 commit b0af4c7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public struct FloatingLabelTextField: View {
var centerTextFieldView: some View {
ZStack(alignment: notifier.textAlignment.getAlignment()) {

if (notifier.isAnimateOnFocus ? !isSelected : textFieldValue.isEmpty) {
if (notifier.isAnimateOnFocus ? (!isSelected && textFieldValue.isEmpty) : textFieldValue.isEmpty) {
Text(placeholderText)
.font(notifier.placeholderFont)
.multilineTextAlignment(notifier.textAlignment)
Expand Down

0 comments on commit b0af4c7

Please sign in to comment.