react-autoselect

1.0.2 • Public • Published

react-autoselect

Select-on-focus fields for ReactJS.

import React from 'react'
import {render} from 'react-dom'
import {Input, TextArea} from 'react-autoselect'

render(
  <div>
    <Input type="text" width="200" />
    <TextArea rows="3" />
  </div>,
  document.getElementById('app')
)

Custom onFocus, including cancelling the select by returning false or preventing default:

<Input onFocus={() => console.log('focus')} />
<Input onFocus={() => false} />
<Input onFocus={(e) => e.preventDefault()} />

Readme

Keywords

none

Package Sidebar

Install

npm i react-autoselect

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

791 kB

Total Files

9

Last publish

Collaborators

  • adjohnson916