File tree 1 file changed +4
-0
lines changed 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export interface CSVReaderProps {
17
17
inputId ?: string
18
18
inputName ?: string
19
19
inputStyle ?: object
20
+ inputRef ?: React . LegacyRef < HTMLInputElement >
20
21
label ?: string | React . ReactNode
21
22
onError ?: ( error : Error ) => void
22
23
onFileLoaded : ( data : Array < any > , fileInfo : IFileInfo , originalFile ?: File ) => any
@@ -34,6 +35,7 @@ const CSVReader: React.FC<CSVReaderProps> = ({
34
35
inputId = 'react-csv-reader-input' ,
35
36
inputName = 'react-csv-reader-input' ,
36
37
inputStyle = { } ,
38
+ inputRef,
37
39
label,
38
40
onError = ( ) => { } ,
39
41
onFileLoaded,
@@ -88,6 +90,7 @@ const CSVReader: React.FC<CSVReaderProps> = ({
88
90
accept = { accept }
89
91
onChange = { handleChangeFile }
90
92
disabled = { disabled }
93
+ ref = { inputRef }
91
94
/>
92
95
</ div >
93
96
)
@@ -102,6 +105,7 @@ CSVReader.propTypes = {
102
105
inputId : PropTypes . string ,
103
106
inputName : PropTypes . string ,
104
107
inputStyle : PropTypes . object ,
108
+ inputRef : PropTypes . func ,
105
109
label : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . element ] ) ,
106
110
onError : PropTypes . func ,
107
111
onFileLoaded : PropTypes . func . isRequired ,
You can’t perform that action at this time.
0 commit comments