Skip to content

issue: code.split is not a function. (In 'code.split("")','code.split' is undefined) #102

@KrushnaNaghate

Description

@KrushnaNaghate

<OTPInputView
style={{
width: '100%',
height: 50,
alignSelf: 'center',
marginBottom: 20,
}}
pinCount={6}
code={(this.state.code)} //You can supply this prop or not. The component will be used as a controlled / uncontrolled component respectively.
onCodeChanged = {code =>{ if (code.length === 6) { { this.setState({code},()=>{ console.log('codeotp',this.state.code); })}}}}
autoFocusOnLoad={false}
keyboardType="number-pad"
codeInputFieldStyle={{
width: 32,
height: 45,
borderWidth: 2,
alignSelf: 'center',
borderRadius: 5,
color: color.secondarycolor,
}}
codeInputHighlightStyle={{
borderColor: color.secondarycolor,

            }}
            onCodeFilled={code => {

Screenshot_2022-08-02-19-32-18-81_c11b992e6582eb7cde7f603a58deef46

              console.log(`Code is ${code}, you are good to go!`);
            }}
            // placeholderTextColor={{color:color.primarycolor}}
          />``

I'm getting this, issue when I want to pass default value to otp , I need to add default value for getting autofill otp by hash code sms

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions