This class helps manage a group of handles.
Method Overview
Name | Return Type | Summary | Class |
---|---|---|---|
Adds a group of handles. more details | Handles | ||
Destroys the object, removing all the handles. more details | Handles | ||
Boolean | Returns true if a group exists for the provided group key, false otherwise. more details | Handles | |
Removes a group of handles. more details | Handles | ||
Removes all handles. more details | Handles |
Method Details
-
add(handles, groupKey)
-
Adds a group of handles.
Parametershandles WatchHandle|WatchHandle[]|Collection<WatchHandle>An array or collection handles to group.
groupKey *optionalKey identifying the group to which the handles should be added. All the handles in the group can later be removed with Handles.remove(). If no key is provided the handles are added to a default group.
Exampleslet handles = new Handles(); handles.add(handle); // added to the default group handles.add([handle1, handle2]); // added to the default group handles.add(handle, "handle-group"); handles.add([handle1, handle2], "other-handle-group");
let handles = new Handles(); handles.add(reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } ));
-
destroy()
-
Destroys the object, removing all the handles.
Examplelet handles = new Handles(); handles.add(reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } )); handles.destroy();
-
has(groupKey){Boolean}
-
Returns true if a group exists for the provided group key, false otherwise.
ParametergroupKey *group handle key
ReturnsType Description Boolean
-
remove(groupKey)
-
Removes a group of handles.
ParametergroupKey *optionalA group key or an array or collection of group keys to remove.
Examplelet handles = new Handles(); handles.remove(); // removes handles from default group handles.remove("handle-group"); handles.remove("other-handle-group");
-
removeAll()
-
Removes all handles.