Skip to content

GridCellFilter supports ListDataProvider only #48

Description

@mvysny

Hi, wonderful work with the cell filter! It could be made so that instead of depending on ListDataProvider solely, it could use any ConfigurableFilterDataProvider data provider; the filters for that data provider can be created using a FilterFactory interface provided to the GridCellFilter in the constructor:

interface FilterFactory<F> : Serializable {
    fun and(filters: Set<F>): F?
    fun or(filters: Set<F>): F?
    fun eq(propertyName: String, value: Any): F
    fun le(propertyName: String, value: Any): F
    fun ge(propertyName: String, value: Any): F
    fun like(propertyName: String, value: String): F
    fun between(propertyName: String, min: Any, max: Any) = and(setOf(ge(propertyName, min), le(propertyName, max)))
}

Backward compatibility can be done easily, since ListDataProvider implements the ConfigurableFilterDataProvider interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions