Closed lawrenz1337 closed 5 years ago
I have a PR up, it should allow you to do something like:
<AvField tag={[CustomInput, ReactInputMask]} ... />
to have AvField
render a CustomInput
with a tag
of ReactInputMask
@TheSharpieOne Thanks for you PR! But it doesn't seem to work yet... You can check my example here https://stackblitz.com/edit/react-dw17ff?file=Hello.js
@TheSharpieOne I can also confirm that this does not seem to work. I tweaked @lawrenz1337's example here: https://stackblitz.com/edit/react-j7bf9e and I'm seeing:
Error in /turbo_modules/availity-reactstrap-validation@2.5.0/lib/AvInput.js (85:12)
tags is not defined
@nicobailon I am not sure you pasted your version correctly. I am seeing the same code as what @lawrenz1337 pasted.
Also the prop name is tag
without the s
.
the error about tags
is coming from this lib. There is an unreleased fix: #112. @GoPro16 can you or @robmcguinness cut a new release to include that fix?
@GoPro16 apologies. I have fixed the link.
I'll release shortly
Just released @2.5.1
Can we get a working example of how to use input maks?
@henrique-barreto check out https://stackblitz.com/edit/react-8smaux?file=Hello.js
<AvForm>
<AvField
label="Phone Number"
type="tel"
mask="(999) 999-9999"
maskChar="-"
name='Test'
tag={[Input, InputMask]}
required
helpMessage="Valid NANP phone number cannot start with a 1"
/>
</AvForm>
react-input-mask
uses the same parametertag
asAvField
for CustomInput from reactstrap. They override eachother and default input is rendered istead