Universal DataProvider for CRUD, Grid and ComboBox

I tried to implement a very basic custom data provider with following signature:

public class CustomDataProvider<E extends AbstractEntity, R extends AbstractRepository<E>>
        extends AbstractBackEndDataProvider<E, String>
        implements ConfigurableFilterDataProvider<E, String, CrudFilter {

When using it in an crud component vaadin seems to swap the String with the CrudFilter. Is there a way I can prevent this behavior?

Here is a snippet of the vaadin flow repository:

public abstract class DataProviderWrapper<T, F, M>
        implements DataProvider<T, F> {

    protected DataProvider<T, M> dataProvider;

Looks like the data provider wrapper swaps the filter. I wanted to handle the String and CrudFilter in my repository.