Selector.js Terminal Options

When a user creates a selector through auto-completion in Selector.js, the user will eventually reach a 'terminal' choice - one that finishes the selector.

By default, this will simply give them a single option that will call the callback function you specified.

If you'd like to customise the text of the option or provide multiple options to your users, you can use the terminal option in Selector.js.

Example

Let's say we want to offer customers the option of selecting to look at either the dashboard or the diagram for an asset once they've reached the end of their selector.

For example…

        terminals: [
	{
		name: "Show Dashboard",					
		callback: "ChooseDash"
	},
	{
		name: "Show Diagrams",					
		callback: "ChooseDiagram"
	}]

This provides the customer with two options for the asset, 'Show Dashboard' (which calls the 'ChooseDash' function when clicked) and 'Show Diagrams' (which calls the ChooseDiagram function when clicked).