I know there is
React.findDOMNode(component).value/focus(). I am looking for all the methods can be used with
For example, I have an
<input type='checkbox' ref='component' /> tag, and I tried
React.findDOMNode(this.refs.component).selected (I dont know if it exists), and there is nothing.
React.findDOMNode is described by the Top-Level API documentation:
DOMElement findDOMNode(ReactComponent component)
If this component has been mounted into the DOM, this returns the corresponding native browser DOM element. This method is useful for reading values out of the DOM, such as form field values and performing DOM measurements. When
The value returned is a native DOM element—not a React-specific type, which is why it's not covered by the React documentation.
You can always assign an event and use
©2020 All rights reserved.