Core Props
apiKey
Section titled “apiKey”| Type | string |
| Required | Yes |
Your Updog license key. Validated on each open.
<DataEditor apiKey="your-license-key" ... />className
Section titled “className”| Type | string |
CSS class added to the wrapper element. Use for scoped styling overrides.
enableAddRow
Section titled “enableAddRow”| Type | boolean |
| Default | true |
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} ... />enableDeleteRow
Section titled “enableDeleteRow”| Type | "all" | "new" | false |
| Default | false |
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" ... />exportFormats
Section titled “exportFormats”| Type | DataEditorFormat[] | false |
| Default | All 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.
headerHeight
Section titled “headerHeight”| Type | number |
| Default | 36 |
Header row height in pixels.
localStorage
Section titled “localStorage”| Type | false | { 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 totrue.
| Type | "modal" | "inline" |
| Default | "modal" |
Rendering mode. "modal" wraps the editor in a full-screen dialog overlay. "inline" renders it directly in the DOM.
onClose
Section titled “onClose”| Type | () => void |
| Required | Modal 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 | boolean |
| Required | Modal mode only |
Controls modal visibility. This is a controlled prop — you manage the state.
primaryKey
Section titled “primaryKey”| Type | keyof TRow |
| Required | Yes |
The column that uniquely identifies each row, like id or email.
<DataEditor<Employee> primaryKey="id" ... />readonly
Section titled “readonly”| Type | boolean |
| Default | false |
When true, hides all editing UI. The grid becomes view-only.
rowHeight
Section titled “rowHeight”| Type | number |
| Default | 34 |
Row height in pixels.
variant
Section titled “variant”| Type | "editor" | "uploader" |
| 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.