retyui / react-native-confirmation-code-field

A react-native confirmation code field compatible with iOS, Android and Web
MIT License
1.07k stars 125 forks source link

Add an ability to pass "autofocus" parameter to InputComponent #229

Closed lightSoulDev closed 1 year ago

retyui commented 1 year ago

component type already extends TextInputProps from react-native that have to provide autoFocus prop :

export interface Props extends BaseProps, OmitStyle<TextInputProps> {...}

// -------

import {
  CodeField
} from 'react-native-confirmation-code-field';

<CodeField autoFocus={true} /> // <- should work as expected 
lightSoulDev commented 1 year ago

Oh, sure. Maybe my lsp was freaking out. Thanks.