Skip to content

Core Props

Every prop <DataEditor /> accepts, in alphabetical order. Props that have a page of their own are listed here with a link to it.

PropTypeDefault
apiKeystringRequired
blockSubmitOnErrorbooleanfalse
chatDataEditorChat
classNamestring
columnsDataEditorColumn[]Required
enableAddRowbooleantrue
enableAddSourcebooleantrue
enableCreateColumnbooleantrue
enableDeleteRow"all" | "new" | falsefalse
exportFormatsDataEditorFormat[] | falseAll formats
headerHeightnumber36
importFormatsDataEditorFormat[] | falseAll formats
loadData(onChunk) => Promise<void>
localestring"en"
localStoragefalse | { licenseGrant?: boolean }{ licenseGrant: true }
mode"modal" | "inline""modal"
onClose() => voidModal mode only
onColumnMatch(headers, columns) => map
onComplete(result) => void | Promise<void>
onError(error: UpdogError) => void
onValueMatch(valuesToMatch) => map
openbooleanModal mode only
primaryKeykeyof TRowRequired
readonlybooleanfalse
remoteSourcesRemoteSource[]
rowHeightnumber34
rtlbooleanfalse
sampleDataRecord<string, unknown>[]
synonymsRecord<string, string[]>
translationsDataEditorTranslations
variant"editor" | "uploader" | "viewer""editor"
Typestring
RequiredYes

Your Updog license key. Validated on each open.

<DataEditor apiKey="your-license-key" ... />
Typeboolean
Defaultfalse

Disables the submit button while any row has a validation error. When false, errors are flagged but the user can still submit.

When set, submission is also blocked while remote checks are in flight (isAsyncValidating) — a value that is about to come back “already exists” cannot slip through. The 60-second inactivity timeout on remote checks guarantees this gating can never wedge. When unset (the default), in-flight checks never block submission and unresolved cells pass through as unverified.

<DataEditor blockSubmitOnError ... />
TypeDataEditorChat<TRow>

Bring-your-own-AI chat. When provided, a chat panel is shown alongside the grid. You own the AI integration. The SDK hands you dataset context and renders the streamed response.

See Bring Your Own AI.

Typestring

CSS class added to the wrapper element. Use for scoped styling overrides.

TypeDataEditorColumn[]
RequiredYes

The schema your app expects. Each column defines an id, a title, and optionally an editor, validators, a transformer, a formatter, and a filter.

See Columns for every column-level prop.

Typeboolean
Defaulttrue

Controls whether users can manually add rows. When true, the data sources panel shows an “Add row” button, and the row context menu offers Insert row above, Insert row below, and Duplicate row. When false, all four entry points are hidden — users can only edit existing rows or import data.

<DataEditor enableAddRow={false} ... />
Typeboolean
Defaulttrue

Controls whether the “Add data source” button appears in the data sources panel. When false, the button is hidden — users can’t open the add-source menu (import data, add row) from the panel.

<DataEditor enableAddSource={false} ... />
Typeboolean
Defaulttrue

Allow creating new columns for unmatched headers during import. When enabled, users can keep data from file columns that do not match your schema.

See enableCreateColumn.

Type"all" | "new" | false
Defaultfalse

Controls row deletion via the right-click context menu.

  • false — deletion disabled
  • "new" — only manually added or imported rows can be deleted
  • "all" — any row can be deleted
<DataEditor enableDeleteRow="all" ... />
TypeDataEditorFormat[] | false
DefaultAll formats

Which file formats the user can export to. Set to false to disable export entirely.

<DataEditor exportFormats={["csv", "xlsx"]} ... />

See DataEditorFormat for the full list of formats.

Typenumber
Default36

Header row height in pixels.

TypeDataEditorFormat[] | false
DefaultAll formats

Which file formats the user can import. Set to false to disable import entirely.

See importFormats.

Type(onChunk) => Promise<void>

Async function that feeds existing data into the editor. Called once when the editor opens. Call onChunk one or more times to stream rows in batches.

See Loading Data.

Typestring
Default"en"

BCP 47 locale tag used to pick plural forms. It does not load translations and it does not switch the language.

See locale.

Typefalse | { licenseGrant?: boolean }
Default{ licenseGrant: true }

Controls what the editor stores in localStorage. Set to false to disable all local storage usage.

  • licenseGrant — cache the license validation result to skip re-validation on reload. Defaults to true.
Type"modal" | "inline"
Default"modal"

Rendering mode. "modal" wraps the editor in a full-screen dialog overlay. "inline" renders it directly in the DOM.

Type() => void
RequiredModal mode only

Called when the user closes the modal (X button or Escape key). If the user has unsaved changes, the SDK shows a confirmation dialog before calling onClose.

Type(headers: string[], columns: DataEditorColumn[]) => Record<string, string | null>

Override column matching during import. Return a map of fileHeader to column ID. Unmapped or null entries fall back to built-in matching.

See onColumnMatch.

Type(result: DataEditorResult<TRow>) => void | Promise<void>

Called when the user clicks Submit. Receives the edited data grouped by source.

See Submitting.

Type(error: UpdogError) => void

Called when the SDK catches an internal error. The SDK recovers where it can. Use this for logging and monitoring.

See Error Handling.

Type(valuesToMatch: Record<string, ValueMatchInput>) => ValueMatchOutput

Override value matching for select columns during import. Return a map of column ID to imported-value pairs.

See onValueMatch.

Typeboolean
RequiredModal mode only

Controls modal visibility. This is a controlled prop — you manage the state.

Typekeyof TRow
RequiredYes

The column that uniquely identifies each row, like id or email.

<DataEditor<Employee> primaryKey="id" ... />
Typeboolean
Defaultfalse

When true, hides all editing UI. The grid becomes view-only.

TypeRemoteSource[]

Your own remote data sources, rendered as buttons on the upload step. You own the integration. The SDK renders the button and processes the result of fetch().

See remoteSources.

Typenumber
Default34

Row height in pixels.

Typeboolean
Defaultfalse

Enable right-to-left layout. Affects grid direction, text alignment, scrollbar position, and the column order in exported files.

See rtl.

TypeRecord<string, unknown>[]

Sample rows included in the Download Example file offered by the import wizard. When omitted, a generic example row is generated from your column definitions.

See sampleData.

TypeRecord<string, string[]>

Extra aliases layered on top of the built-ins, for both column matching and value matching. Each key is the canonical target, and the array lists the aliases.

See synonyms.

TypeDataEditorTranslations

Override any UI string. Pass a partial object. Only the keys you provide are replaced. This is the prop that changes the language.

See Localization.

Type"editor" | "uploader" | "viewer"
Default"editor"

Controls the initial view. "editor" opens directly to the spreadsheet grid. "uploader" opens the file import wizard first — the user uploads a file, maps columns, fixes errors, then continues to the grid. "viewer" renders a read-only, chrome-free grid with no filters sidebar, footer, or chat. It is always read-only regardless of the readonly prop.