@@ -19,7 +19,6 @@ import classNames from 'classnames';
19
19
import { debounce } from "lodash" ;
20
20
21
21
import { IFieldState , IValidationResult } from "./Validation" ;
22
- import { ComponentClass } from "../../../@types/common" ;
23
22
import Tooltip from "./Tooltip" ;
24
23
25
24
// Invoke validation from user input (when typing, etc.) at most once every N ms.
@@ -83,7 +82,6 @@ export interface IInputProps extends IProps, InputHTMLAttributes<HTMLInputElemen
83
82
inputRef ?: RefObject < HTMLInputElement > ;
84
83
// The element to create. Defaults to "input".
85
84
element ?: "input" ;
86
- componentClass ?: undefined ;
87
85
// The input's value. This is a controlled component, so the value is required.
88
86
value : string ;
89
87
}
@@ -93,7 +91,6 @@ interface ISelectProps extends IProps, SelectHTMLAttributes<HTMLSelectElement> {
93
91
inputRef ?: RefObject < HTMLSelectElement > ;
94
92
// To define options for a select, use <Field><option ... /></Field>
95
93
element : "select" ;
96
- componentClass ?: undefined ;
97
94
// The select's value. This is a controlled component, so the value is required.
98
95
value : string ;
99
96
}
@@ -102,7 +99,6 @@ interface ITextareaProps extends IProps, TextareaHTMLAttributes<HTMLTextAreaElem
102
99
// The ref pass through to the textarea
103
100
inputRef ?: RefObject < HTMLTextAreaElement > ;
104
101
element : "textarea" ;
105
- componentClass ?: undefined ;
106
102
// The textarea's value. This is a controlled component, so the value is required.
107
103
value : string ;
108
104
}
@@ -111,8 +107,6 @@ export interface INativeOnChangeInputProps extends IProps, InputHTMLAttributes<H
111
107
// The ref pass through to the input
112
108
inputRef ?: RefObject < HTMLInputElement > ;
113
109
element : "input" ;
114
- // The custom component to render
115
- componentClass : ComponentClass ;
116
110
// The input's value. This is a controlled component, so the value is required.
117
111
value : string ;
118
112
}
@@ -248,7 +242,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
248
242
249
243
public render ( ) {
250
244
/* eslint @typescript-eslint/no-unused-vars: ["error", { "ignoreRestSiblings": true }] */
251
- const { element, componentClass , inputRef, prefixComponent, postfixComponent, className, onValidate, children,
245
+ const { element, inputRef, prefixComponent, postfixComponent, className, onValidate, children,
252
246
tooltipContent, forceValidity, tooltipClassName, list, validateOnBlur, validateOnChange, validateOnFocus,
253
247
usePlaceholderAsHint, forceTooltipVisible,
254
248
...inputProps } = this . props ;
@@ -265,7 +259,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
265
259
// Appease typescript's inference
266
260
const inputProps_ = { ...inputProps , ref : this . inputRef , list } ;
267
261
268
- const fieldInput = React . createElement ( this . props . componentClass || this . props . element , inputProps_ , children ) ;
262
+ const fieldInput = React . createElement ( this . props . element , inputProps_ , children ) ;
269
263
270
264
let prefixContainer = null ;
271
265
if ( prefixComponent ) {
0 commit comments