Skip to content

Commit

Permalink
Correct type of whitelist object
Browse files Browse the repository at this point in the history
  • Loading branch information
gugu committed Jan 28, 2019
1 parent 74c25d5 commit a40a698
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/text-field/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ import * as classnames from 'classnames';
// @ts-ignore no .d.ts file
import {MDCTextFieldFoundation} from '@material/textfield/dist/mdc.textfield';

const VALIDATION_ATTR_WHITELIST = [
'pattern', 'min', 'max', 'required', 'step', 'minlength', 'maxlength'
]

export interface InputProps<T> {
className: string;
inputType: 'input' | 'textarea';
Expand Down Expand Up @@ -60,6 +56,11 @@ declare type ValidationAttrWhiteList =
declare type ValidationAttrWhiteListReact =
Exclude<ValidationAttrWhiteList, 'minlength' | 'maxlength'> | 'minLength' | 'maxLength';

const VALIDATION_ATTR_WHITELIST: ValidationAttrWhiteList[] = [
'pattern', 'min', 'max', 'required', 'step', 'minlength', 'maxlength'
]


export default class Input<T extends {}> extends React.Component<
Props<T>, InputState
> {
Expand Down

0 comments on commit a40a698

Please sign in to comment.