search-input-react
![preview](preview.gif)
Last updated 2 years ago by zweizhao .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install search-input-react 
SYNC missed versions from official npm registry.

search input for react

preview

install

npm install --save-dev search-input-react close-canvas-react style-loader css-loader

webpack.config.js

// add loader
{
    test: /\.css$/,
    loader: "style-loader!css-loader"
}

import

import SearchInput from 'search-input-react'

use

<SeacrchInput
    placeholder='placeholder'
    defaultValue='defaultValue'
    regex={this.searchInputRegex.bind(this)}
    searchClick={this.searchInputClick.bind(this)}
    inputChange={this.searchInputChange.bind(this)}
    setClearValue={handle => this.searchInputClearValue = handle}/>

searchClick: click glass or hit enter´╝îget the value

searchInputClick(value) {
    console.log(value)
}

inputChange: link to searchInput's onChange

searchInputChange(value) {
    console.log(value)
}

placeholder: placeholder, optional

defaultValue: defaultValue, optional

regex: the regex with your logic, optional

setClearValue: clear value, optional

Current Tags

  • 1.1.1                                ...           latest (2 years ago)

5 Versions

  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 13
Dependencies (479)
Dev Dependencies (13)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |