Moved view event to component