Skip to content

resolveDuplicateTitle

resolveDuplicateTitle(props): string | undefined

Defined in: packages/core/src/documents/cloneDocumentForDuplicate.ts:34

The source document’s current title, when useAsTitle names a renameable title field — not a Convex system field (_id/_creationTime/_updatedAt) and holding a non-empty string. undefined otherwise. cloneDocumentForDuplicate uses this to decide whether (and what) to rename; a caller displaying the pre-rename title (the duplicate dialog’s “copied from” note) reads it here instead of re-deriving the same rule.

Input props.

Record<string, unknown>

The source document.

string | undefined

The collection’s admin.useAsTitle.

string | undefined

The current title string, or undefined when there is none to rename.