From ded467235393552199462be7ff8f3a9db886ce00 Mon Sep 17 00:00:00 2001
From: aleksandrovpv
Date: Thu, 25 Jun 2026 12:44:51 +0400
Subject: [PATCH 1/2] Document genericFilter base condition behavior
The data loader's own base condition is combined with the active
configuration's condition (base AND configuration). Document that the
base condition is read during view initialization, after onInit.
Co-Authored-By: Claude Opus 4.8 (1M context)
---
.../modules/flow-ui/pages/vc/components/genericFilter.adoc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/content/modules/flow-ui/pages/vc/components/genericFilter.adoc b/content/modules/flow-ui/pages/vc/components/genericFilter.adoc
index 33280013..5e94a98b 100644
--- a/content/modules/flow-ui/pages/vc/components/genericFilter.adoc
+++ b/content/modules/flow-ui/pages/vc/components/genericFilter.adoc
@@ -42,6 +42,13 @@ include::example$onboarding/src/main/resources/com/company/onboarding/view/compo
<3> The `genericFilter` component is bound to the loader through its `dataLoader` attribute.
<4> xref:flow-ui:vc/components/dataGrid.adoc[`dataGrid`] displaying the data from the data container. The list of records will change as they are filtered.
+[NOTE]
+====
+The data loader can have its own *base condition*, set in the loader's `condition` element or programmatically. `genericFilter` does not replace it: the active configuration's condition is combined with the base condition as `base AND configuration`.
+
+The base condition is read from the data loader while the view is initializing, right after the view's `onInit` handler. The condition present on the loader at that moment becomes the base for all subsequent filtering, so define the base condition declaratively or in `onInit`.
+====
+
[[quick-filter-example]]
== Quick Filter Example
From e77c3fd825a1c510824d8cf3d3211abc22d5cd75 Mon Sep 17 00:00:00 2001
From: aleksandrovpv
Date: Mon, 29 Jun 2026 12:47:51 +0400
Subject: [PATCH 2/2] Update genericFilter base condition note
The jmix#5400 fix is now in master: the base condition is combined with
the active configuration (base AND configuration) and preserved across
configuration switches. Clarify that the base condition is changed via
DataLoader.setCondition() with a new object; modifying the existing
condition in place is ignored by the filter.
Relates to jmix-framework/jmix#5400.
Co-Authored-By: Claude Opus 4.8 (1M context)
---
.../modules/flow-ui/pages/vc/components/genericFilter.adoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/content/modules/flow-ui/pages/vc/components/genericFilter.adoc b/content/modules/flow-ui/pages/vc/components/genericFilter.adoc
index 5e94a98b..2254f3e1 100644
--- a/content/modules/flow-ui/pages/vc/components/genericFilter.adoc
+++ b/content/modules/flow-ui/pages/vc/components/genericFilter.adoc
@@ -44,9 +44,9 @@ include::example$onboarding/src/main/resources/com/company/onboarding/view/compo
[NOTE]
====
-The data loader can have its own *base condition*, set in the loader's `condition` element or programmatically. `genericFilter` does not replace it: the active configuration's condition is combined with the base condition as `base AND configuration`.
+The data loader can have its own *base condition*, set in the loader's `condition` element or programmatically via `DataLoader.setCondition()`. `genericFilter` does not replace it: the active configuration's condition is combined with the base condition as `base AND configuration`, including when you switch between configurations.
-The base condition is read from the data loader while the view is initializing, right after the view's `onInit` handler. The condition present on the loader at that moment becomes the base for all subsequent filtering, so define the base condition declaratively or in `onInit`.
+To change the base condition, set a new `Condition` object via `DataLoader.setCondition()`. Modifying the object returned by `DataLoader.getCondition()` in place, without setting a new reference, is ignored by the filter: the change is not picked up and is overwritten the next time the filter rebuilds the loader condition (a direct `DataLoader.load()` before that rebuild reads the modified object, but the filter does not preserve it).
====
[[quick-filter-example]]