medipass / react-payment-inputs

A React Hook & Container to help with payment card input fields.
https://medipass.github.io/react-payment-inputs
342 stars 62 forks source link

Pass event through onFocus #34

Closed Hopp3r closed 4 years ago

Hopp3r commented 4 years ago

On Focus should pass through the event. Pretty sure this is an appropriate fix.

  const handleFocusCardNumber = React.useCallback((props = {}) => {
    return e => {
      props.onFocus && props.onFocus(e); //should pass through original event
      setFocused('cardNumber');
    };
  }, []);
jxom commented 4 years ago

Thanks! Should be on 1.1.5.