Slackblocks.Views.Modal (slackblocks v2.8.0)
View SourceThe view payload for views.open, views.push, and views.update.
Slack reference: https://docs.slack.dev/surfaces/modals
Fields
title— Sets the title in the modal's top bar. Required.blocks— Adds the blocks shown in the modal, in display order. Required.close— Sets the label of the button that closes the modal. Optional;nilomits the field.submit— Sets the label of the button that submits the modal. Optional;nilomits the field.private_metadata— Sets application-defined data returned in view payloads. Optional;nilomits the field.callback_id— Sets an identifier returned in view payloads so your app can recognize the view. Optional;nilomits the field.clear_on_close— Sets whether closing this modal closes every view in its stack. Optional;nilomits the field.notify_on_close— Sets whether Slack sends a view_closed event when the user closes the modal. Optional;nilomits the field.external_id— Sets a workspace-unique identifier you can use to update the view later. Optional;nilomits the field.submit_disabled— Sets whether the submit button starts disabled. Only valid in workflow configuration modals. Optional;nilomits the field.
Summary
Functions
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.
Types
@type t() :: %Slackblocks.Views.Modal{ blocks: [Slackblocks.Types.block()], callback_id: binary() | nil, clear_on_close: boolean() | nil, close: Slackblocks.Objects.PlainText.t() | nil, external_id: binary() | nil, notify_on_close: boolean() | nil, private_metadata: binary() | nil, submit: Slackblocks.Objects.PlainText.t() | nil, submit_disabled: boolean() | nil, title: Slackblocks.Objects.PlainText.t() }
Functions
@spec change( t(), keyword() ) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.