Skip to content

Commit

Permalink
Use correct types for TextFieldProps['inputProps'] and TextFieldProps…
Browse files Browse the repository at this point in the history
…['SelectProps']

Resolves mui#9313.
  • Loading branch information
pelotom committed Nov 28, 2017
1 parent be0d4fd commit e4dbcb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/TextField/TextField.d.ts
Expand Up @@ -2,7 +2,8 @@ import * as React from 'react';
import { StandardProps, PropTypes } from '..';
import { FormControlProps, FormHelperTextProps } from '../Form';
import { InputProps, InputLabelProps } from '../Input';
import { FormControlClassKey } from '../Form/FormControl'
import { FormControlClassKey } from '../Form/FormControl';
import { SelectProps } from '../Select';

export interface TextFieldProps extends StandardProps<
FormControlProps,
Expand All @@ -23,7 +24,7 @@ export interface TextFieldProps extends StandardProps<
inputClassName?: string;
InputClassName?: string;
InputLabelProps?: InputLabelProps;
inputProps?: Object;
inputProps?: InputProps['inputProps'];
InputProps?: InputProps;
inputRef?: React.Ref<any>;
label?: React.ReactNode;
Expand All @@ -36,7 +37,7 @@ export interface TextFieldProps extends StandardProps<
rows?: string | number;
rowsMax?: string | number;
select?: boolean;
SelectProps?: Object;
SelectProps?: SelectProps;
type?: string;
value?: string | number;
margin?: PropTypes.Margin;
Expand Down
1 change: 1 addition & 0 deletions test/typescript/components.spec.tsx
Expand Up @@ -780,6 +780,7 @@ const TextFieldTest = () =>
value={'Alice'}
InputProps={{ classes: { root: 'foo' } }}
/>
<TextField type="number" inputProps={{ min: "0", max: "10", step: "1" }} />
</div>;

const SelectTest = () => {
Expand Down

0 comments on commit e4dbcb9

Please sign in to comment.