Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/components/hv-text-field/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ const HvTextField = (props: HvComponentProps) => {
const textContentType =
(props.element.getAttribute('text-content-type') as TextContextType) ||
'none';
// Force email addresses to have no auto-capitalization, others use default
const defaultCapitalization =
keyboardType === 'email-address' ? 'none' : undefined;
const autoCapitalize =
(props.element.getAttribute('auto-capitalize') as
| 'none'
| 'sentences'
| 'words'
| 'characters') || defaultCapitalization;

// Handlers
const setFocus = (focused: boolean) => {
Expand Down Expand Up @@ -104,6 +113,7 @@ const HvTextField = (props: HvComponentProps) => {
props.options.registerInputHandler(ref);
}
}}
autoCapitalize={autoCapitalize}
autoFocus={autoFocus}
defaultValue={defaultValue}
editable={editable}
Expand Down