blob: 20e4f2413c36e8d951581b330ca892ab1a690c5a [file] [log] [blame]
AviZi280f8012017-06-09 02:39:56 +03001import React from 'react';
2import SelectInput from 'nfvo-components/input/SelectInput.jsx';
3
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +02004const 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 );
AviZi280f8012017-06-09 02:39:56 +030026};
27
28export default SelectActionTableCell;