OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to select all text in input with Reactjs, when it focused?

  • Thread starter Thread starter Alexander Shtang
  • Start date Start date
A

Alexander Shtang

Guest
For example: codepen

Code:
var InputBox = React.createClass({
  render: function() {
    return (
      <input className="mainInput" value='Some something'></input>
    )
  }
});

<p>For example: <a href="http://codepen.io/Enclave88/pen/YqNpog?editors=1010" rel="noreferrer">codepen</a> </p>

<pre><code>var InputBox = React.createClass({
render: function() {
return (
<input className="mainInput" value='Some something'></input>
)
}
});
</code></pre>
 

Online statistics

Members online
0
Guests online
5
Total visitors
5
Top