1.1.9 • Published 6 years ago

react-flex-dropdown v1.1.9

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

React Dropdown with keyboard handlers. Press down and up arrows to select. Manually type to filter the items.

Install

npm install react-flex-dropdown --save

Usage

import React from 'react';
import FlexDropdown from 'react-flex-dropdown';

const onItemSelect = (value) => {
    console.log(value);
}

const data = ['Item1', 'Item2', 'Item3', 'Item4', 'Item5'];
            or
const data = [
              {label: 'Item1', value: 'item1'},
              {label: 'Item2', value:'item2'},
              {label:'Item3', value:'item3'},
              {label:'Item4', value:'item4'},
              {label:'Item5', value:'item5'}
              ];

const selectedItem = data[1];

const App = () => {
        return <div>
            <FlexDropdown data={data} editable={true} placeholder='Choose'
            onItemSelect={onItemSelect} selectedItem={selectedItem} />
        </div>
}
export default App;
1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago