onTicketTypePrompt
Called when the chart needs to prompt which ticket type to select.
To understand how to integrate this callback, please read the Prompts API page.
Possible triggers:
- Selecting a seat with multiple ticket types.
Defining
onTicketTypePrompt: (parameters: object, confirmSelection: function) => {}
Parameters
An object describing what needs to be prompted to the end user.
ticketTypes
: An array of possible ticket types to pick from, defined in dictionary form.objectToSelect
: Object to be selected.
Example:
{
ticketTypes: [
{ price: 12, ticketType: "Adult", formattedPrice: "12€" },
{ price: 8, ticketType: "Child", formattedPrice: "8€" }
],
objectToSelect: {
// ...
label: "K-7",
// ...
}
}
confirmSelection
Callback. Must be called to perform the selection once the user has made their choice on your custom dialog.
function(ticketType: string)
ticketType
: String with the ticket type id (as defined in theticketType
property of a ticket type object).
Example:
confirmSelection("Adult")
Working example
Click on a green seat to handle ticket type selection with a browser prompt.