public class DataLoaderFilterFactoryKt
| Modifier and Type | Method and Description |
|---|---|
static <T> FilterRow<T,com.github.mvysny.vokdataloader.Filter> |
generateFilterComponents(com.vaadin.ui.components.grid.HeaderRow $receiver,
com.vaadin.ui.Grid<T> grid,
kotlin.reflect.KClass<T> itemClass,
FilterFieldFactory<T,com.github.mvysny.vokdataloader.Filter> filterFieldFactory,
com.vaadin.shared.ui.ValueChangeMode valueChangeMode)
Re-creates filters in this header row. Simply call
grid.appendHeaderRow().generateFilterComponents(grid) to automatically attach
filters to non-generated columns. Please note that filters are not re-generated when the container data source is changed. |
public static <T> FilterRow<T,com.github.mvysny.vokdataloader.Filter> generateFilterComponents(com.vaadin.ui.components.grid.HeaderRow $receiver, com.vaadin.ui.Grid<T> grid, kotlin.reflect.KClass<T> itemClass, FilterFieldFactory<T,com.github.mvysny.vokdataloader.Filter> filterFieldFactory, com.vaadin.shared.ui.ValueChangeMode valueChangeMode)
Re-creates filters in this header row. Simply call grid.appendHeaderRow().generateFilterComponents(grid) to automatically attach
filters to non-generated columns. Please note that filters are not re-generated when the container data source is changed.
This function automatically generates vok-dataloader Filters and this is what you typically want to use (since you're
using VokDataProvider).
T - the type of items in the grid.grid - the owner grid.filterFieldFactory - used to create the filters themselves. If null, class DefaultFilterFieldFactory is used.valueChangeMode - how eagerly to apply the filtering after the user changes the filter value. Only applied to HasValueChangeMode;
typically only applies to inline filter
components (most importantly com.vaadin.ui.TextField), typically ignored for popup components (such as com.github.vok.framework.NumberFilterPopup)
where the values are applied after the user clicks the "Apply" button. Defaults to ValueChangeMode.LAZY.