AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame^] | 1 | import React from 'react'; |
| 2 | import SelectInput from 'nfvo-components/input/SelectInput.jsx'; |
| 3 | |
| 4 | const SelectActionTableCell = ({options, selected, disabled, onChange, clearable = true, placeholder}) => { |
| 5 | return ( |
| 6 | <div className='select-action-table-cell'> |
| 7 | <SelectInput |
| 8 | placeholder={placeholder} |
| 9 | type='select' |
| 10 | value={selected} |
| 11 | data-test-id='select-action-table-dropdown' |
| 12 | disabled={disabled} |
| 13 | onChange={option => onChange(option ? option.value : null)} |
| 14 | clearable={clearable} |
| 15 | options={options} /> |
| 16 | </div> |
| 17 | ); |
| 18 | }; |
| 19 | |
| 20 | export default SelectActionTableCell; |