Only jump to date after pressing the 'go' button (#8548)
This commit is contained in:
parent
c67b41fbde
commit
97c99c6aae
4 changed files with 4 additions and 150 deletions
|
@ -19,7 +19,6 @@ import classNames from 'classnames';
|
|||
import { debounce } from "lodash";
|
||||
|
||||
import { IFieldState, IValidationResult } from "./Validation";
|
||||
import { ComponentClass } from "../../../@types/common";
|
||||
import Tooltip from "./Tooltip";
|
||||
|
||||
// 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
|
|||
inputRef?: RefObject<HTMLInputElement>;
|
||||
// The element to create. Defaults to "input".
|
||||
element?: "input";
|
||||
componentClass?: undefined;
|
||||
// The input's value. This is a controlled component, so the value is required.
|
||||
value: string;
|
||||
}
|
||||
|
@ -93,7 +91,6 @@ interface ISelectProps extends IProps, SelectHTMLAttributes<HTMLSelectElement> {
|
|||
inputRef?: RefObject<HTMLSelectElement>;
|
||||
// To define options for a select, use <Field><option ... /></Field>
|
||||
element: "select";
|
||||
componentClass?: undefined;
|
||||
// The select's value. This is a controlled component, so the value is required.
|
||||
value: string;
|
||||
}
|
||||
|
@ -102,7 +99,6 @@ interface ITextareaProps extends IProps, TextareaHTMLAttributes<HTMLTextAreaElem
|
|||
// The ref pass through to the textarea
|
||||
inputRef?: RefObject<HTMLTextAreaElement>;
|
||||
element: "textarea";
|
||||
componentClass?: undefined;
|
||||
// The textarea's value. This is a controlled component, so the value is required.
|
||||
value: string;
|
||||
}
|
||||
|
@ -111,8 +107,6 @@ export interface INativeOnChangeInputProps extends IProps, InputHTMLAttributes<H
|
|||
// The ref pass through to the input
|
||||
inputRef?: RefObject<HTMLInputElement>;
|
||||
element: "input";
|
||||
// The custom component to render
|
||||
componentClass: ComponentClass;
|
||||
// The input's value. This is a controlled component, so the value is required.
|
||||
value: string;
|
||||
}
|
||||
|
@ -248,7 +242,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
|
|||
|
||||
public render() {
|
||||
/* eslint @typescript-eslint/no-unused-vars: ["error", { "ignoreRestSiblings": true }] */
|
||||
const { element, componentClass, inputRef, prefixComponent, postfixComponent, className, onValidate, children,
|
||||
const { element, inputRef, prefixComponent, postfixComponent, className, onValidate, children,
|
||||
tooltipContent, forceValidity, tooltipClassName, list, validateOnBlur, validateOnChange, validateOnFocus,
|
||||
usePlaceholderAsHint, forceTooltipVisible,
|
||||
...inputProps } = this.props;
|
||||
|
@ -265,7 +259,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
|
|||
// Appease typescript's inference
|
||||
const inputProps_ = { ...inputProps, ref: this.inputRef, list };
|
||||
|
||||
const fieldInput = React.createElement(this.props.componentClass || this.props.element, inputProps_, children);
|
||||
const fieldInput = React.createElement(this.props.element, inputProps_, children);
|
||||
|
||||
let prefixContainer = null;
|
||||
if (prefixComponent) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue