Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
...commonPropTypes.createCommon({
content: false,
}),
clearable: PropTypes.bool,
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
fluid: PropTypes.bool,
icon: customPropTypes.itemShorthandWithoutJSX,
iconPosition: PropTypes.oneOf(['start', 'end']),
input: customPropTypes.itemShorthand,
inputRef: customPropTypes.ref,
inline: PropTypes.bool,
inverted: PropTypes.bool,
onChange: PropTypes.func,
type: PropTypes.string,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
wrapper: customPropTypes.wrapperShorthand,
}
static defaultProps = {
accessibility: inputBehavior,
type: 'text',
wrapper: {},
iconPosition: 'end',
}
static autoControlledProps = ['value']
actionHandlers = {
clear: (e: React.KeyboardEvent) => {
if (this.props.clearable && this.state.value !== '') {
e.stopPropagation()
e.nativeEvent && e.nativeEvent.stopPropagation()