1.1.9 • Published 7 years ago

react-flex-dropdown v1.1.9

Weekly downloads
8
License
MIT
Repository
github
Last release
7 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

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago