licenseKey - Your Flatfile license key can be found in your dashboard when you login here. | Required. string | licenseKey={'ah12-alksjs2738-shdkaj123'} |
customer - Refers to the setCustomer function. | Required. object - CustomerObject | customer={{
usedId: "1234",
companyId: "12",
companyName: "ABC",
email: "john@doe.com",
name: "John Doe"
}} |
settings - This is where you will pass your Flatfile settings/options. | Required. object | settings={{ type: "Customers", fields: [ {key: "name", label: "Name"}, {key: "email", label: "Email"}
]}} |
onCancel - An optional callback for handling a user cancelling. | Optional. function - callback | onCancel={() => { // do something }} |
onInteractionEvent - An optional way to use registerInteractionEventCallback to receive user interaction events. By default, the onInteractionEvent function will be called every 5 seconds, as long as there is user activity inside of Flatfile Portal. | Optional. function | onInteractionEvent={({mousemove, mousedown, keydown}) => // do something} |
onBeforeFetch - An optional callback called before fetching | Optional. function | onBeforeFetch={() => { // do something} |
onData - An optional way to use FlatfileResults to return a new Promise. | Optional. function | onData={async results => // do something} |
onRecordChange - An optional way to use registerRecordHook when a record changes. | Optional. function | onRecordChange={(data, index) => IDataHookResponse | Promise< IDataHookResponse >} |
onRecordInit - An optional way to use registerRecordHook on initialization. | Optional. function | onRecordInit={(data, index) => IDataHookResponse | Promise< IDataHookResponse >} |
fieldHooks - An optional way to pass in one or more callback functions to use with registerFieldHook. | Optional. object function(s) - callback(s) | fieldHooks={
fieldName: (values) => { return // [ IDataHookRecord , index][]} |
preload - An optional flag that can be set to false to delay loading the importer until the button is clicked. Useful in situations where there is more than one <FlatfileButton/> instance on a single page or minimizing page load size is important. Default is true . | Optional. boolean | preload={false} |