bhrott / react-native-masked-text

A pure javascript masked text and input text component for React-Native.
MIT License
1.6k stars 251 forks source link

Mask don't work with custom TextField #207

Open jefferson-docway opened 4 years ago

jefferson-docway commented 4 years ago

Hi, I'm trying use this lib with the "react-native-material-textfield", but it's not working.

Here is my code:

state = {
    phoneCustom: '',
    phone: ''
}

render() {
    return(
        <View>
            <TextInputMask
                type={'cel-phone'}
                customTextInput={TextField}
                customTextInputProps={{
                    label: 'Celular'
                }}
                value={this.state.phoneCustom}
                onChangeText={phoneCustom => this.setState({ phoneCustom })} />

              <TextInputMask
                  type={'cel-phone'}
                  value={this.state.phone}
                  onChangeText={phone => this.setState({ phone })} />
        </View>
    )
}

And this is the output:

Screenshot_20191204-183515_2

Any solution?

bfraiman commented 4 years ago

Any solution?

plgrazon commented 4 years ago

Any solution?

Came here to say this as well. I highly doubt we will get any answers.