Skip to content

Commit

Permalink
Add maxLength support to AutoFill method in TextInput
Browse files Browse the repository at this point in the history
  • Loading branch information
osxtest committed Nov 18, 2024
1 parent df6d06a commit 1f5cc8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ func (i TextInput) AutoFill() (value []string) {
length = i.minLength
return []string{randomString(length)}
}
if i.maxLength > 0 {
length = i.maxLength
return []string{randomString(length)}
}
return i.anyInput.AutoFill()
}

Expand Down

0 comments on commit 1f5cc8b

Please sign in to comment.