summaryrefslogtreecommitdiffstats
path: root/documentation/datamodel/datamodel-providers.asciidoc
diff options
context:
space:
mode:
authorLeif Åstrand <legioth@gmail.com>2017-01-25 09:23:09 +0200
committerDenis <denis@vaadin.com>2017-01-25 09:23:09 +0200
commitdcb8271b50b9d76dd9c56af1f1621ed39072b229 (patch)
treeff14a7b93c9b3fa88ec4f931e05033525d8dd801 /documentation/datamodel/datamodel-providers.asciidoc
parentb5cc119d1b120695b5e04b596372f2fb982a32d7 (diff)
downloadvaadin-framework-dcb8271b50b9d76dd9c56af1f1621ed39072b229.tar.gz
vaadin-framework-dcb8271b50b9d76dd9c56af1f1621ed39072b229.zip
Allow distinct configurable filter and wrapped filter types (#8322)
* Allow distinct configurable filter and wrapped filter types This enables implementing the use case that was already described towards the end of datamodel-providers.asciidoc. Also swaps the order of the callback type parameters to make all three match the order of the ConfigurableFilterDataProvider type parameters.
Diffstat (limited to 'documentation/datamodel/datamodel-providers.asciidoc')
-rw-r--r--documentation/datamodel/datamodel-providers.asciidoc5
1 files changed, 3 insertions, 2 deletions
diff --git a/documentation/datamodel/datamodel-providers.asciidoc b/documentation/datamodel/datamodel-providers.asciidoc
index 35d47db4f9..6b5fea2275 100644
--- a/documentation/datamodel/datamodel-providers.asciidoc
+++ b/documentation/datamodel/datamodel-providers.asciidoc
@@ -402,7 +402,7 @@ DataProvider<Person, Set<String>> personProvider = getPersonProvider();
ConfigurableFilterDataProvider<Person, String, Set<String>> wrapper =
personProvider.withConfigurableFilter(
- (Set<String> configuredFilters, String queryFilter) -> {
+ (String queryFilter, Set<String> configuredFilters) -> {
Set<String> combinedFilters = new HashSet<>();
combinedFilters.addAll(configuredFilters);
combinedFilters.add(queryFilter);
@@ -529,7 +529,8 @@ everythingConfigurable.setFilter(
// For use with ComboBox and separate department filtering
ConfigurableDataProvider<Person, String, Department> mixed =
dataProvider.withConfigurableFilter(
- (department, filterText) -> {
+ // Can be shortened as PersonFilter::new
+ (filterText, department) -> {
return new PersonFilter(filterText, department);
}
);