0.5.5 • Published 4 years ago

material-ui-search-bar-enhanced v0.5.5

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

Material Search Bar (Enhanced)

JavaScript Style Guide Build Status Greenkeeper badge

Enhanced version of Wertarbyte's Material Search Bar.

  • Added onClear props for the clearing event handler.
  • On the virtual keyboard, display "Search" button instead of Return/Go.

Example

See this component in action

Installation

npm i --save material-ui-search-bar-enhanced

Usage

import SearchBar from 'material-ui-search-bar-enhanced'

// ...
render() {
  return(
    <SearchBar
      onChange={() => console.log('onChange')}
      onRequestSearch={() => console.log('onRequestSearch')}
      onClear={() => console.log('onClear')}
      style={{
        margin: '0 auto',
        maxWidth: 800
      }}
    />
  )
}

SearchBar Properties

NameTypeDefaultDescription
closeIconnode<CloseIcon color={grey500} />Override the close icon.
dataSourcearray[]Array of strings or nodes used to populate the list.
dataSourceConfigobjectConfig for objects list dataSource.
hintTextstringSearchSets hintText for the embedded TextField.
iconButtonStyleobjectOverride the inline-styles of the button element.
onChange*functionFired when the text value changes.
onClearfunctionFired when the clear icon is clicked.
onRequestSearch*functionFired when the search icon is clicked.
searchIconnode<SearchIcon color={grey500} />Override the search icon.
styleobjectOverride the inline-styles of the root element.
valueanyThe value of the text field.
disabledbooleanfalseDisables underlying autocomplete.

* required property

License

The files included in this repository are licensed under the MIT license.

0.5.5

4 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.4

6 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago