Skip to content

Commit

Permalink
[react-input-autosize] Only accept callback style refs (DefinitelyTyp…
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangYiJiang authored and RyanCavanaugh committed May 24, 2019
1 parent b749ebf commit ebf0e7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion types/react-input-autosize/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions types/react-input-autosize/react-input-autosize-tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit ebf0e7e

Please sign in to comment.