events for type edit and deletion