()
| 198 | const outOfRangeCls = isOutOfRange && `${prefixCls}-out-of-range`; |
| 199 | |
| 200 | const getInputElement = () => { |
| 201 | // Fix https://fb.me/react-unknown-prop |
| 202 | const otherProps = omit( |
| 203 | props as Omit<InputProps, 'value'> & { |
| 204 | value?: React.InputHTMLAttributes<HTMLInputElement>['value']; |
| 205 | }, |
| 206 | [ |
| 207 | 'prefixCls', |
| 208 | 'onPressEnter', |
| 209 | 'addonBefore', |
| 210 | 'addonAfter', |
| 211 | 'prefix', |
| 212 | 'suffix', |
| 213 | 'allowClear', |
| 214 | // Input elements must be either controlled or uncontrolled, |
| 215 | // specify either the value prop, or the defaultValue prop, but not both. |
| 216 | 'defaultValue', |
| 217 | 'showCount', |
| 218 | 'count', |
| 219 | 'classes', |
| 220 | 'htmlSize', |
| 221 | 'styles', |
| 222 | 'classNames', |
| 223 | 'onClear', |
| 224 | ], |
| 225 | ); |
| 226 | return ( |
| 227 | <input |
| 228 | autoComplete={autoComplete} |
| 229 | {...otherProps} |
| 230 | onChange={onInternalChange} |
| 231 | onFocus={handleFocus} |
| 232 | onBlur={handleBlur} |
| 233 | onKeyDown={handleKeyDown} |
| 234 | onKeyUp={handleKeyUp} |
| 235 | className={clsx( |
| 236 | prefixCls, |
| 237 | { |
| 238 | [`${prefixCls}-disabled`]: disabled, |
| 239 | }, |
| 240 | classNames?.input, |
| 241 | )} |
| 242 | style={styles?.input} |
| 243 | ref={inputRef} |
| 244 | size={htmlSize} |
| 245 | type={type} |
| 246 | onCompositionStart={(e) => { |
| 247 | compositionRef.current = true; |
| 248 | onCompositionStart?.(e); |
| 249 | }} |
| 250 | onCompositionEnd={onInternalCompositionEnd} |
| 251 | /> |
| 252 | ); |
| 253 | }; |
| 254 | |
| 255 | const getSuffix = () => { |
| 256 | // Max length value |
no outgoing calls
no test coverage detected
searching dependent graphs…