Filtering
The Table component allows you to implement filtering to narrow down displayed data based on specific criteria. Filtering can be achieved by defining a filtering criteria using the setFilter(Predicate<T> filter) method provided by the Repository associated with the table
The following example uses a user-defined criteria from the search field and the setBaseFilter() method to apply a filter to the CollectionRepository based on the titles of MusicRecord. When the commit() method is triggered, the table refreshes with the filtered data.
Show Code
- Java
note
The setBaseFilter() method belongs to the CollectionRepository class, not the Table component.