The DromoUploader component is the primary way to integrate Dromo into your React application. It accepts the following props:
licenseKey
string
required
Your Dromo front-end license key, which can be found in the Dromo dashboard.
fields
Field[]
required
An array of Field objects which comprise your import schema.
settings
Settings
required
Settings object to change the behavior of the Dromo importer.
user
User
required
User metadata object to associate with the import.
schemaId
string
The ID of a pre-existing schema created in Schema Studio. If provided, the fields, settings (except importIdentifier and developmentMode), and hooks props will be ignored in favor of the saved schema’s configuration. See Usage with saved schemas.
rowHooks
RowHook[]
An array of row hook functions.
bulkRowHooks
BulkRowHook[]
An array of bulk row hook functions.
columnHooks
object[]
An array of column hook objects. Each object has two entries:
fieldKey
string
required
The field key of the field this column hook should run on.
callback
ColumnHookFn
required
The column hook function.
stepHooks
object[]
An array of step hook objects. Each object has two entries:
type
'UPLOAD_STEP' | 'REVIEW_STEP' | 'REVIEW_STEP_POST_HOOKS'
required
The type of step hook.
callback
StepHookFn
required
A function matching the signature for the specified step hook type.
beforeFinish
BeforeFinishCallbackFn
A beforeFinish callback function called immediately before completing the import to check results.
onResults
OnResultsCallbackFn
An onResults callback function called with the results after the user finishes the import.
onCancel
() => void
Called if the user leaves the Dromo Uploader before completing the import.
open
boolean
(Available in version >= 2.0.9) If provided, determines whether the Dromo importer modal should open. See Controlling the Modal Programmatically.
developmentMode
boolean
Overrides the developmentMode setting if a schemaId is also provided. Defaults to false.
importIdentifier
string
Overrides the importIdentifier setting if a schemaId is also provided.