Skip to content

Commit

Permalink
fix onChange() and onBlur() types for FilePicker (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharf5 committed Aug 18, 2020
1 parent 92c787e commit a81be4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -900,9 +900,9 @@ export interface FilePickerOwnProps {
/** the height of the filepicker */
height?: number
/** function called when onChange is fired */
onChange?: () => void
onChange?: (files: FileList) => void
/** function called when onBlur is fired */
onBlur?: () => void
onBlur?: (event: React.FocusEvent) => void
/** placeholder of the text input */
placeholder?: string
}
Expand Down
6 changes: 4 additions & 2 deletions src/file-picker/src/FilePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,14 @@ FilePicker.propTypes = {
height: PropTypes.number,

/**
* Function called when onChange is fired
* Function called when onChange is fired.
* (files: FileList) => void
*/
onChange: PropTypes.func,

/**
* Function called when onBlur is fired
* Function called when onBlur is fired.
* (event: React.FocusEvent) => void
*/
onBlur: PropTypes.func,

Expand Down

0 comments on commit a81be4c

Please sign in to comment.