void OnUsageChanged(EventBase evt) { if (evt.eventTypeId == ChangeEvent <bool> .TypeId()) { var e = (ChangeEvent <bool>)evt; var componentRow = ((VisualElement)evt.target).GetFirstOfType <ComponentRow>(); if (componentRow?.Component == null) { return; } Store.Dispatch(new ChangeComponentUsageAction((ComponentQueryDeclarationModel)componentRow.GraphElementModel, componentRow.Component, e.newValue)); } }