Skip to content

ConfirmationController

Properties

bulk

Whether messages uses the per-object shape (true) or the aggregate shape (false). Set from the bulk option passed to request(), which in turn comes from the ConfirmationRequiredError that reported the warnings -- the only place that knows which request path (single-object or bulk) produced them.

Type: boolean

Source: client/lib/use/useConfirmationController.js:27

cancel

Resolve the pending request with false.

Type: () => void

Source: client/lib/use/useConfirmationController.js:38

confirm

Resolve the pending request with true.

Type: () => void

Source: client/lib/use/useConfirmationController.js:37

consumers

Number of registered consumers able to resolve a request.

Type: number

Source: client/lib/use/useConfirmationController.js:31

messages

Warnings to display.

Type: WarningsMapping

Source: client/lib/use/useConfirmationController.js:26

open

Whether the confirmation dialog should be shown.

Type: boolean

Source: client/lib/use/useConfirmationController.js:25

register

Announce a consumer that renders the dialog and will call confirm()/cancel().

Type: () => void

Source: client/lib/use/useConfirmationController.js:32

request

Open the dialog and resolve to the user's choice (true = confirm, false = cancel). Resolves false immediately when no consumer is registered.

Type: (messages: WarningsMapping, options: object) => Promise

Source: client/lib/use/useConfirmationController.js:34

unregister

Remove a previously registered consumer.

Type: () => void

Source: client/lib/use/useConfirmationController.js:33

Source

client/lib/use/useConfirmationController.js:24

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2