1.0.8 • Published 2 years ago

select-search-input-tk v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

select-input-search-tk

Introduction

SelectSearchData is a React component that allows you to create a search input with a customizable selection list.

Installation

To use SelectSearchData, you can install it via npm or yarn:

npm install select-search-input-tk

or

yarn add select-search-input-tk

Usage

Import

import SelectSearchData from 'select-search-input-tk';
import 'select-search-input-tk/lib/selectSearchData.css';

Props

PropTypeDescription
dataany[]The selection data list
titlestringThe property of each data item
valuestringThe value of the property to determine the selected item
placeholderstringPlaceholder for the search input
onSearchfunctionTypeCallback triggered when search is performed
styleCSSPropertiesCSS style for the component
defaultValueany[]Default value
onChangefunctionChangeTypeCallback triggered when value is changed

Example

<SelectSearchData
  data={data}
  title="name"
  value="id"
  placeholder="Search..."
  onSearch={(value, top, bottom) => console.log(value, top, bottom)}
  style={{ width: '300px' }}
  defaultValue={[]}
  onChange={(values) => console.log(values)}
/>

Version

1.0.8

Author

tk0038

License

ISC

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago