Class

Import

Import(props) → {React.Component}

Overview

The Import section of RuLeStudio. Allows a user to customise and create their project.
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.

View Source Body/Import/Import.js, line 25

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.

View Source Body/Import/Import.js, line 79

# 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.

View Source Body/Import/Import.js, line 118