Drupal 8: Custom FIeld Type & Views Relationships


Recently I faced a problem where I needed to add some properties to the EntityReference field type. Inspired on this article I decided to created a custom field type that extends EntityReference and adds the properties there. Everything works fine.. The custom type, the custom widget and the custom formatter, that inherit from there corresponding of EntityReference classes.

The problem is that I can use the new field correctly on content types but I cannot use the field in Views. I mean I cannot use the field in the relationship section of the view. The main relation field does not appear in the list of fields to choose.

Do I need to override another method? extend another class? create another plugin? add another annotation? I could not fined examples of this use case.

Any Idea?

thanks a lot

Drupal version: 

Source: https://www.drupal.org/taxonomy/term/4/feed