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 | |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 4 | const SelectActionTableCell = ({ |
| 5 | options, |
| 6 | selected, |
| 7 | disabled, |
| 8 | onChange, |
| 9 | clearable = true, |
| 10 | placeholder |
| 11 | }) => { |
| 12 | return ( |
| 13 | <div className="select-action-table-cell"> |
| 14 | <SelectInput |
| 15 | placeholder={placeholder} |
| 16 | type="select" |
| 17 | value={selected} |
| 18 | data-test-id="select-action-table-dropdown" |
| 19 | disabled={disabled} |
| 20 | onChange={option => onChange(option ? option.value : null)} |
| 21 | clearable={clearable} |
| 22 | options={options} |
| 23 | /> |
| 24 | </div> |
| 25 | ); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 26 | }; |
| 27 | |
| 28 | export default SelectActionTableCell; |