API Reference > imodeljs-frontend > SelectionSet > SelectionSetEvent SelectionSetEvent Type alias Payload sent to SelectionSet.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"); } SelectionSetEvent = SelectAddEvent | SelectRemoveEvent | SelectReplaceEvent Defined in core/frontend/src/SelectionSet.ts Line 75 Last Updated: 11 June, 2024