Created following container in react.js using semanticUI (react.SemanticUI)
When I use this in code I get the following warning:
Warning: Unknown prop control
on tag. Remove this prop from the element.
I am unable to figure out why using as='select' is giving this error. If I remove the as='select', I get a different error saying I cannot have an array inside
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import {Container, Form, Select } from 'semantic-ui-react';
const AnswerOptionYesNoSelect = ({ Id, Value, onAnswerChanged }) => (
<Container>
<Form.Select as="select" required name={Id} defaultValue={Value} onChange={onAnswerChanged} placeholder="Select Options">
<option value=""></option>
<option value="Oklahoma">OK</option>
<option value="Texas">TX</option>
</Form.Select>
</Container>
);
AnswerOptionYesNoSelect.propTypes = {
Id: PropTypes.string.isRequired,
Value: PropTypes.string.isRequired,
onAnswerChanged: PropTypes.func.isRequired,
};
export default AnswerOptionYesNoSelect;