react-password-mask icon indicating copy to clipboard operation
react-password-mask copied to clipboard

Children element not renders and wrapping div should be optional of choice

Open jsbimra opened this issue 3 years ago • 0 comments

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! image

jsbimra avatar Feb 08 '22 18:02 jsbimra