ChoiceCallback

public class ChoiceCallback : AbstractCallback, ObservableObject, @unchecked Sendable

A callback that collects single user input from available choices, with predefined default choice.

  • List of available options for ChoiceCallback

    Declaration

    Swift

    private(set) public var choices: [String] { get }
  • Default choice value defined from OpenAM

    Declaration

    Swift

    private(set) public var defaultChoice: Int { get }
  • The prompt message displayed to the user

    Declaration

    Swift

    private(set) public var prompt: String { get }
  • The selected choice index

    Declaration

    Swift

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

    Declaration

    Swift

    public override func initValue(name: String, value: Any)
  • Returns the payload with the selected choice value.

    Declaration

    Swift

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