This repository was archived by the owner on Jul 29, 2025. It is now read-only.
  
  
  
  
  
Description
NativeControl.js contains an  element, which can be focused programatically. Currently there is no way to do that. The best "React" way is to use the ref and call .focus() on the input element.
So far the best solution is to allow for a ref prop and use allow the user to intercept the element.
Currently in NativeControl:
rippleActivatorRef = React.createRef();
... 
<input
        type='checkbox'
        className='mdc-checkbox__native-control'
        ref={rippleActivatorRef}
        {...otherProps}
 />
Potential solution:
rippleActivatorRef = props.rippleActivtorRef || React.createRef();
...