public class DataProviderUtilsKt
| Modifier and Type | Method and Description |
|---|---|
static <T> com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<T,com.github.vokorm.Filter,com.github.vokorm.Filter> |
sortedBy(com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<T,com.github.vokorm.Filter,com.github.vokorm.Filter> $receiver,
com.vaadin.flow.data.provider.QuerySortOrder sort)
Returns a new data provider which delegates to receiver but with given list of sort orders appended to anything passed in to com.vaadin.flow.data.provider.Query.
The com.vaadin.flow.data.provider.Query.sortOrders take precedence: any user-specified sorting in Grid takes precedence.
|
static <T> com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<T,com.github.vokorm.Filter,com.github.vokorm.Filter> |
withConfigurableFilter2(com.vaadin.flow.data.provider.DataProvider<T,? super com.github.vokorm.Filter<T>> $receiver)
Wraps this data provider in a configurable filter, regardless of whether this data provider is already a configurable filter or not.
|
static <T> com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<T,com.github.vokorm.Filter,com.github.vokorm.Filter> |
withFilter(com.vaadin.flow.data.provider.DataProvider<T,? super com.github.vokorm.Filter<T>> $receiver,
com.github.vokorm.Filter<T> other)
Produces a new data provider which restricts rows returned by the original data provider to given filter.
|
public static <T> com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<T,com.github.vokorm.Filter,com.github.vokorm.Filter> withConfigurableFilter2(com.vaadin.flow.data.provider.DataProvider<T,? super com.github.vokorm.Filter<T>> $receiver)
Wraps this data provider in a configurable filter, regardless of whether this data provider is already a configurable filter or not.
public static <T> com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<T,com.github.vokorm.Filter,com.github.vokorm.Filter> withFilter(com.vaadin.flow.data.provider.DataProvider<T,? super com.github.vokorm.Filter<T>> $receiver,
com.github.vokorm.Filter<T> other)
Produces a new data provider which restricts rows returned by the original data provider to given filter.
Invoking this method multiple times will chain the data providers and restrict the rows further.
other - applies this filterpublic static <T> com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<T,com.github.vokorm.Filter,com.github.vokorm.Filter> sortedBy(com.vaadin.flow.data.provider.ConfigurableFilterDataProvider<T,com.github.vokorm.Filter,com.github.vokorm.Filter> $receiver,
com.vaadin.flow.data.provider.QuerySortOrder sort)
Returns a new data provider which delegates to receiver but with given list of sort orders appended to anything passed in to com.vaadin.flow.data.provider.Query. The com.vaadin.flow.data.provider.Query.sortOrders take precedence: any user-specified sorting in Grid takes precedence.
This can thus be used to specify the default ordering of the data source in case when the user selected no sorting for the Grid.
Cannot be used on in-memory data provider - this function will throw IllegalArgumentException if receiver is an in-memory data provider.
Example of usage: grid.dataProvider = Person.dataProvider.sortedBy(Person::name.asc)
sort - append these sort criteria. May be empty - in that case just returns the receiver.