ConflictSheet
Shown when a save met someone else's change: their value beside the one this person tried to save, for each field where the two differ, theirs first. "Keep mine" saves over theirs at the new version; "Take theirs" drops the changes. ResourceForm, RecordView's settings sections and Data Studio's record panel open it on a `conflict`.
packages/ui/src/components/data/ConflictSheet.tsx
Import
Subpath export:
@marktiderman/genesis-ui/dataimport { ConflictSheet } from "@marktiderman/genesis-ui/data";Components
Auto-generated from TypeScript source via
react-docgen-typescript.ConflictSheet
Shown when a save met someone else's change: their value beside the one this person tried to save, for each field where the two differ, theirs first. "Keep mine" saves over theirs at the new version; "Take theirs" drops the changes. ResourceForm, RecordView's settings sections and Data Studio's record panel open it on a `conflict`.
| Prop | Type | Default | Description |
|---|---|---|---|
| conflict* | WriteConflict | null | — | The conflict to show (`useResourceForm`'s `conflict`, or `writeConflict(error, values)`); null keeps it closed. |
| onDismiss* | () => void | — | Closed without choosing (Escape, or outside): the changes stay where they are, unsaved. |
| onKeepMine* | () => void | Promise<void> | — | Save these values over theirs, at the version the conflict reported. The sheet waits for it, and shows its error when it rejects (a new conflict replaces `conflict` instead). |
| onTakeTheirs* | () => void | — | Drop these values and show their row. |
| format | ((field: string, value: unknown) => ReactNode) | — | A field's value as shown. Default: plain text. |
| label | ((field: string) => string) | — | A field's label. Default: the field name, title-cased. |
| noun | string | — | The record's noun ("task"), for the title. |
| testID | string | conflict-sheet |