mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[react-input-autosize] Only accept callback style refs (#35555)
This commit is contained in:
parent
b749ebfe18
commit
ebf0e7e257
2
types/react-input-autosize/index.d.ts
vendored
2
types/react-input-autosize/index.d.ts
vendored
@ -9,7 +9,7 @@ import * as React from 'react';
|
||||
|
||||
export interface AutosizeInputProps extends React.InputHTMLAttributes<HTMLInputElement>, React.ClassAttributes<HTMLInputElement> {
|
||||
inputClassName?: string;
|
||||
inputRef?: React.Ref<HTMLInputElement>;
|
||||
inputRef?: (instance: HTMLInputElement | null) => void;
|
||||
inputStyle?: React.CSSProperties;
|
||||
minWidth?: string | number;
|
||||
onAutosize?: (inputWidth: string | number) => void;
|
||||
|
||||
@ -2,10 +2,10 @@ import * as React from 'react';
|
||||
import AutosizeInput, { AutosizeInputProps } from 'react-input-autosize';
|
||||
|
||||
class Test extends React.Component<AutosizeInputProps> {
|
||||
input: HTMLInputElement;
|
||||
input: HTMLInputElement | null = null;
|
||||
auto: AutosizeInput;
|
||||
|
||||
inputRef = (ref: HTMLInputElement) => {
|
||||
inputRef = (ref: HTMLInputElement | null) => {
|
||||
this.input = ref;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user