SelectionSetEvent Type
SelectionSetEvent = SelectAddEvent | SelectRemoveEvent | SelectReplaceEvent
Payload sent to onChanged event listeners to describe how the contents of the set have changed.
The type
property of the event serves as a type assertion. For example, the following code will output the added and/or removed Ids:
processSelectionSetEvent(ev: SelectionSetEvent): void {
if (SelectionSetEventType.Add === ev.type || SelectionSetEventType.Replace === ev.type)
console.log("Added " + ev.added.size + " elements");
if (SelectionSetEventType.Add !== ev.type)
console.log("Removed " + ev.removed.size + " elements");
}
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.