Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Filtering in vaadin-grid 2
The demos for vaadin-grid 2.x don't seem to show how to do the following kind of filtering.
<vaadin-date-picker max="[[endValue]]" value="{{startValue}}" label="Start"></vaadin-date-picker>
<vaadin-date-picker min="[[startValue]]" value="{{endValue}}" label="End"></vaadin-date-picker>
<vaadin-grid items="[[items]]">
<vaadin-grid-column>
<template class="header">
Date
</template>
<template>
<!-- TODO Filter only the dates that are between start and end value. -->
[[item.date]]
</template>
</vaadin-grid-column>
</vaadin-grid>
Any help? ;)
Hi :)
The built-in filtering (of “items” array data) only handles filtering based on substring matching against a property/sub-property of the items.
You can however implement any kind of custom filtering/sorting by setting a dataProvider function for the grid and having the custom filtering logic there.
Same as OP I would also like to do interval filtering. As well as being able to filter for multiple strings (string1 | string2).
@Tomi: Filtering inside Vaadin Grid is quite fast. Would filtering outside Vaading as fast?
My case is something like this:
<firebase-query path="/tweets" data="{{tweets}}"></firebase-query>
<vaadin-grid id="material" items="{{tweets}}"></<vaadin-grid>
Where is the Vaadin Filtering code located?
I have looked at vaadin-grid-filter-behavior.html and vaadin-grid-filter.html with no luck.
Should be easy to hack my own custom solution there.
Sorry for the delay. Built-in filtering of the items array is performed inside vaadin-grid-array-data-provider-behavior.html https://github.com/vaadin/vaadin-grid/blob/master/vaadin-grid-array-data-provider-behavior.html#L119