Combine Excel-like filters and drop-down lists with text search in the same table [message #1851636] |
Mon, 11 April 2022 14:21 |
Dietrich Travkin Messages: 13 Registered: July 2009 |
Junior Member |
|
|
I implemented a tabular view based on NatTable. I use the ComboBoxFilterRowHeaderComposite for filtering the content and it works fine as long as I use the drop-down lists for each column. But for some columns, I prefer to use a text search field instead of the drop-down list. Unfortunately, that seems not to work.
I added a custom configuration that replaces ComboBoxFilterRowHeaderComposite 's default cell editor with a FilterRowTextCellEditor for the desired column index, but I have the following problems: (a) I still see the little triangle that is used for columns with drop-down lists instead of the filter icon. (b) If I try to edit the text field, I see the text entry "SELECT_ALL". (c) If I enter any text contained in the column, all column entries disappear. The filter does not work properly.
My confuguration code snippet:
int descriptionColumnIndex = indexOfColumn( ColumnConstants.COLUMN_DESCRIPTION, columnHeaderDataProvider );
if (descriptionColumnIndex != INDEX_NOT_FOUND ) {
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITOR,
new FilterRowTextCellEditor(),
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX
+ descriptionColumnIndex);
}
Am I doing something wrong or can ComboBoxFilterRowHeaderComposite not be used with FilterRowTextCellEditors?
Is there a simple way to debug the configuration, layers' behaviour, etc.?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03326 seconds