Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 581920

Summary: SELECT_ALL filter value set for text filters on clear all
Product: [Technology] NatTable Reporter: Dirk Fauth <dirk.fauth>
Component: GlazedLists ExtensionAssignee: Dirk Fauth <dirk.fauth>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1.0   
Target Milestone: 2.2.0   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/201829
https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/202219
Whiteboard:

Description Dirk Fauth CLA 2023-05-10 04:10:31 EDT
If you have a mixed filter row that contains Excel-like combobox filters and text based filters, the columns with text based filter editors will have the value SELECT_ALL set, although that value is only used for combobox filter editors. The reason is that at creation time it is not possible to identify if a combobox filter editor is configured because the configuration process is not done yet. Additionally on clearing all filters, the process with combobox filters is to simply set the value SELECT_ALL for all columns.

For applying a filter this is not an issue, as the SELECT_ALL value is simply removed from the filter values, as it basically means "no filter applied". To handle visualization issues that the SELECT_ALL value is shown in the text filter cell, ComboBoxFilterRowHeaderComposite#getDataValue() has a special handling to remove the value again. This is a reactive way that was chosen because the filter editor inspection is not possible at creation time. But if you want to check if a filter is applied anywhere in the filter row, the current implementation can lead to a false positive, as getDataValue() is not called for columns that are not visible, so the SELECT_ALL value will not be removed reactively.

To fix this the clearing should be done at different places inside ComboBoxFilterRowHeaderComposite. On handling the ClearAllFiltersCommand the call to setAllValuesSelected() should inspect the filter editor configuration. To have the values cleaned up on initialization, the InitializeGridCommand that is fired by NatTable after the configuration should be handled.
Comment 1 Dirk Fauth CLA 2023-06-30 09:12:53 EDT
Released with 2.2.0