react-password-mask
react-password-mask copied to clipboard
Children element not renders and wrapping div should be optional of choice
Wrapper div should be optional if not required to render if we just need input fields and show hide element. also found if we do something like label is ignored to be rendered.
<PasswordMask
id="password"
name="password"
value={formData.password}
onChange={handleChange}
useVendorStyles={false}
showButtonContent={<FontAwesomeIcon icon={faEyeSlash} />}
hideButtonContent={<FontAwesomeIcon icon={faEye} />}
inputClassName={`form-control form-control-sm `}
onShow={() => {
document.querySelector('.jdPasswordField').firstElementChild('div')
}}
>
<label htmlFor="password" className="form-label1">
Password<sup>*</sup>
</label>
</PasswordMask>
Below image with extra wrapping div, should be there, so that bootstrap floating label would work out of box!