Merge pull request #4307 from matrix-org/t3chguy/fixes1111

Field: mark id as optional in propTypes
This commit is contained in:
Michael Telatynski 2020-03-30 19:08:29 +01:00 committed by GitHub
commit 6517ed07bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ function getId() {
export default class Field extends React.PureComponent {
static propTypes = {
// The field's ID, which binds the input and label together. Immutable.
id: PropTypes.string.isRequired,
id: PropTypes.string,
// The element to create. Defaults to "input".
// To define options for a select, use <Field><option ... /></Field>
element: PropTypes.oneOf(["input", "select", "textarea"]),