Skip to content
Snippets Groups Projects
Unverified Commit 06d9b3d0 authored by Dalton's avatar Dalton Committed by GitHub
Browse files

Add propTypes to TokenField (#22611)

parent 84bd09ff
No related branches found
No related tags found
No related merge requests found
/* eslint-disable react/prop-types */
/* eslint "react/prop-types": "warn" */
import React, { Component } from "react";
import PropTypes from "prop-types";
import { findDOMNode } from "react-dom";
......@@ -66,6 +64,37 @@ export default class TokenField extends Component {
optionsStyle: {},
};
static propTypes = {
value: PropTypes.array.isRequired,
placeholder: PropTypes.string,
multi: PropTypes.bool,
validateValue: PropTypes.func,
parseFreeformValue: PropTypes.func,
updateOnInputChange: PropTypes.bool,
optionRenderer: PropTypes.func,
valueRenderer: PropTypes.func,
layoutRenderer: PropTypes.func,
color: PropTypes.string,
style: PropTypes.object,
className: PropTypes.string,
valueStyle: PropTypes.object,
optionsStyle: PropTypes.object,
optionsClassName: PropTypes.string,
prefix: PropTypes.string,
canAddItems: PropTypes.bool,
autoFocus: PropTypes.bool,
removeSelected: PropTypes.bool,
idKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
valueKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
labelKey: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
onChange: PropTypes.func.isRequired,
onFocus: PropTypes.func,
onBlur: PropTypes.func,
onInputKeyDown: PropTypes.func,
onInputChange: PropTypes.func,
updateOnInputBlur: PropTypes.bool,
};
UNSAFE_componentWillMount() {
this._updateFilteredValues(this.props);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment