Skip To ContentArcGIS for DevelopersSign In Dashboard
require(["esri/support/actions/ActionToggle"], function(ActionToggle) { /* code goes here */ });
Class: esri/support/actions/ActionToggle
Since: ArcGIS API for JavaScript 4.8

Type of action that can be used in the LayerList widget. It displays as an action that can be toggled on/off.

See also:

Constructors

new ActionToggle(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
Boolean

Set this property to true to display a spinner icon.

more details
more detailsActionToggle
Boolean

Indicates whether this action is disabled.

more details
more detailsActionToggle
String

The name of the ID assigned to this action.

more details
more detailsActionToggle
String

The title of the action.

more details
more detailsActionToggle
String

Specifies the type of action.

more details
more detailsActionToggle
Boolean

Indicates the value of whether the action is toggled on/off.

more details
more detailsActionToggle
Boolean

Indicates if the action is visible.

more details
more detailsActionToggle

Property Details

active Boolean

Set this property to true to display a spinner icon. You should do this if the action executes an async operation, such as a query, that requires letting the end user know that a process is ongoing in the background. Set the property back to false to communicate to the user that the process has finished.

Default Value:false
disabled Boolean

Indicates whether this action is disabled.

Default Value:false

The name of the ID assigned to this action. This is used for differentiating actions when listening to the trigger-action event.

title String

The title of the action.

The first action is displayed in the LayerList with an icon. The LayerList has a menu that will display all actions with their titles.

type Stringreadonly

Specifies the type of action.

Default Value:"toggle"
value Boolean

Indicates the value of whether the action is toggled on/off.

Default Value:false
visible Boolean

Indicates if the action is visible.

Default Value:true

Method Overview

NameReturn TypeSummaryClass
ActionToggle

Creates a deep clone of this object.

more details
more detailsActionToggle

Method Details

clone(){ActionToggle}

Creates a deep clone of this object.

Returns:
TypeDescription
ActionToggleA clone of the new ActionToggle instance.

API Reference search results

NameTypeModule
Loading...