ConfirmationCallback

public class ConfirmationCallback : AbstractCallback, ObservableObject, @unchecked Sendable

A callback that asks user for YES/NO, OK/CANCEL, YES/NO/CANCEL or other similar confirmations.

  • An array of string for available option(s)

    Declaration

    Swift

    private(set) public var options: [String] { get }
  • Default option

    Declaration

    Swift

    private(set) public var defaultOption: OptionType { get }
  • Confirmation OptionType enum; defaulted to .unknown when the value is not provided

    Declaration

    Swift

    private(set) public var optionType: OptionType { get }
  • Confirmation MessageType enum; defaulted to .unknown when the value is not provided

    Declaration

    Swift

    private(set) public var messageType: MessageType { get }
  • String value of prompt attribute in Callback response; prompt is usually human readable text that can be displayed in UI

    Declaration

    Swift

    private(set) public var prompt: String { get }
  • A value provided from user interaction for this particular callback

    Declaration

    Swift

    public var selectedIndex: Int?
  • Initializes a new instance of ConfirmationCallback with the provided JSON input.

    Declaration

    Swift

    public override func initValue(name: String, value: Any)
  • Returns the payload with the user’s selection value.

    Declaration

    Swift

    public override func payload() -> [String : Any]