CRUD / foldkit-mixins-crud

ConfirmInput

interface · packages/mixins-crud/src/editor.ts:181

interface ConfirmInput<Message> {
  readonly id: string
  readonly status: RemoverStatus
  readonly name: Option.Option<string>
  readonly onConfirm: Message
  readonly onCancel: Message
  readonly error?: string | undefined
  readonly words?: ConfirmWords | undefined
}

Members

ConfirmInput.id

property · packages/mixins-crud/src/editor.ts:183

readonly id: string

Unique on the page: the root's id, and the prefix of its question's.

ConfirmInput.status

property · packages/mixins-crud/src/editor.ts:184

readonly status: RemoverStatus

ConfirmInput.name

property · packages/mixins-crud/src/editor.ts:189

readonly name: Option.Option<string>

What is about to be deleted, as the question names it: a post's title, or its id where that is all the page holds (Remover.target). Without one there is nothing to confirm, so the confirm button is disabled.

ConfirmInput.onConfirm

property · packages/mixins-crud/src/editor.ts:190

readonly onConfirm: Message

ConfirmInput.onCancel

property · packages/mixins-crud/src/editor.ts:191

readonly onCancel: Message

ConfirmInput.error

property · packages/mixins-crud/src/editor.ts:193

readonly error?: string | undefined

Why the delete failed: the remover's error(model)?.message.

ConfirmInput.words

property · packages/mixins-crud/src/editor.ts:194

readonly words?: ConfirmWords | undefined