Closed KremnevDmitry closed 1 month ago
We have no other suitable component for composition collection attributes except MultiValuePicker
, but EntityClearAction
cannot be applied to it. Also, setting EntityClearAction
makes no sense, see https://github.com/jmix-framework/jmix/issues/3709#issuecomment-2377285867.
As a solution, io.jmix.flowui.component.factory.AbstractComponentGenerationStrategy#createCollectionField
won't create field for a composition attribute + added io.jmix.flowui.component.UiComponentsGenerator#generateOrNull
method to call it in the DataGrid
editor.
For QA: Check that no component is generated for DataGrid inline editor for composition collection attribute
Tested on: Jmix version: 2.4.999-SNAPSHOT Jmix Studio plugin version: 2.4.SNAPSHOT6866-242 IntelliJ version: IntelliJ IDEA 2024.2.3 (Community Edition)
Environment
Jmix version: 2.3.999-SNAPSHOT
Bug Description
If you try to change a composition attribute using the DataGrid inline editor, a
MultiValuePicker
component with theMultiValueSelectAction
andValueClearAction
actions will be generated.In this case, when the
ValueClearAction
is executed, no change will occur. When clearing the value, the data context of the view will not change. The data context would change ifEntityClearAction
was used. See related issue: https://github.com/jmix-framework/jmix/issues/3709Current Behavior
Only component presentation value changed.
Expected Behavior
The model value must be cleared.