import React from 'react';
import {Input} from 'semantic-ui-react';
import {getRequest} from '../../../../../actions';

class UnitGroups extends React.Component {

    render() {
        let {groups, data, updateData } = this.props;
        return (
            <div>
                <select value={data.dev} onChange={e => {
                        updateData({...data, dev: e.target.value});
                    }}>
                    <option value="">選擇群組</option>
                    {
                        Object.keys(groups).map((t,idx) => (
                            <option key={idx} value={t}>{groups[t].name}</option>
                        ))
                    }
                </select>
            </div>
        )
    }
}

export default UnitGroups;