6.1.8 • Published 7 months ago

delbari-dropdown-react v6.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

delbari-dropdown-react

For SuperStar Dropdowns

NPM JavaScript Style Guide

Install

npm install --save delbari-dropdown-react

Usage

import React from 'react'

import { ExampleComponent } from 'delbari-dropdown-react'
import 'delbari-dropdown-react/dist/index.css'

const App = () => {
  const list = [
    {id:1,title:"Cristiano",age:38,ghad:'192'},
    {id:2,title:"Drogba",age:36,ghad:'169'},
    {id:3,title:"Zidan",age:25,ghad:'182'},
    {id:4,title:"Messi",age:45,ghad:'198'},
    {id:5,title:"Check",age:26,ghad:'126'},
  ]

  const onChange = (item) => {
    console.log(item)
  }

  return <ExampleComponent 
  keyItem={"title"} // requaired !!
  autoComplate 
  data={list} // requaired !!
  onChange={onChange} 
  otherKeys={["Orders","title","age","ghad"]}
  value={list[2]} />
}

export default App

Api

Props

autoComplate : true | false.\ title : Object key in array for searching and view text on dropdown .\ keyItem : Requaired . for search and action by key.\ otherKeys : for show other keys each item in dropdown.\

Props

PropTypevalueExampledescription
autoComplateBoolinTrue
keyItemStringtitle
dataArray[{id:1,title:"ali",age:"25",weight:"60"}]
onChangeFunctiononChange(item)
valueObject{id:1,title:"ali",age:"25",weight:"60"}
otherKeysArray["title","age","weight"]

License

MIT © ard4030

6.1.8

7 months ago

6.1.7

7 months ago

6.1.6

7 months ago

6.1.5

7 months ago

6.1.4

7 months ago

6.1.3

7 months ago

6.0.3

7 months ago

6.0.2

7 months ago

6.0.0

7 months ago

5.0.0

7 months ago

4.0.0

7 months ago

3.0.0

7 months ago

2.0.0

7 months ago

1.0.0

7 months ago