Constructor
# new Import(props) → {React.Component}
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | |
onFilesAccepted |
function | Callback fired when user accepts selection and requests to create project. |
React.Component
Methods
# static onInputChange(file)
Overview
If a file of the same type was already stored in the state, it is deleted. Then, method checks if the uploaded file is a CSV file and changes state accordingly. Eventually the file is stored in the state.Parameters:
Name | Type | Description |
---|---|---|
file |
Object | A file that was chosen by a user. |
type |
string | The type of data. |
file |
Object | An actual file uploaded by a user. |
# static onInputDelete(file)
Overview
Method removes file from the state. Then, checks whether the deleted file was a CSV file and changes state accordingly.Parameters:
Name | Type | Description |
---|---|---|
file |
Object | A file that is going to be deleted. |
type |
string | The type of data. |
file |
Object | An actual file uploaded by a user. |