igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

ESF does not respect custom column filters

Open hanastasov opened this issue 5 years ago • 20 comments

ESF does not respect custom column filters

  • igniteui-angular version: 9.1.x

Steps to reproduce

  1. Set an IgxStringFilteringOperand custom filter to a column of number data type.
public unitFilters = IgxStringFilteringOperand.instance();,
<igx-column field="UnitsInStock" [dataType]="'number'" [filters]="unitFilters">
</igx-column>
  1. Open ESF dialog

Note that if quick filtering is used, instead of ESF, custom column filters are respected.

Result

Default numeric filters are rendered in the UI, instead of the custom ones

Expected result

Custom filters to be rendered in the UI

Note: Only the list item that expands the filters is not changed: Untitled

hanastasov avatar Oct 27 '20 06:10 hanastasov

@hanastasov if I understand you correctly the ESF dialog correctly shows Number filter because it takes in account the column data context, which in this case is numeric data and therefore Number filter irrelevant whether in the list that is expanded from there we have default or custom operands

StefanIvanov avatar Nov 04 '20 09:11 StefanIvanov

@hanastasov if I understand you correctly the ESF dialog correctly shows Number filter because it takes in account the column data context, which in this case is numeric data and therefore Number filter irrelevant whether in the list that is expanded from there we have default or custom operands

Correct, there are cases where the list item text does not correspond to the filters in the dropdown, as the screenshot shws: Untitled

hanastasov avatar Nov 04 '20 09:11 hanastasov

I still think that for a Numeric column we should show Number filters and for a string one, Text filter

StefanIvanov avatar Nov 04 '20 09:11 StefanIvanov

I still think that for a Numeric column we should show Number filters and for a string one, Text filter

This is the default behavior. But since we allow the developer to assign custom filters, leaving the above mentioned situation as is seems to me like a bug. Imagine a situation where the values in the ESF list are strings, custom filters are string filters, and the user sees the Number filter prompting text/

hanastasov avatar Nov 04 '20 09:11 hanastasov

So on a numeric column you want to define string filter operands, is that what you are saying because I don't see how that will create any meaningful outcome. If we are changing anything I say we let people input the value themselves just like they are able to input the operand values for the custom filters they have, but I am still reluctant to do so.

StefanIvanov avatar Nov 04 '20 09:11 StefanIvanov

Imagine a numeric column, where the developer formats the cell display value to represent the meaning of a numeric value. For example cell value of 20 will display Low text, value of 110 will display Critical text.

The business case says let's filter by 'Low', and 'Critical', so the developer is assigning a custom string filters to that column.

This seems a valid case to me.

hanastasov avatar Nov 04 '20 12:11 hanastasov

@hanastasov, this is a valid case, but changing the label to 'Custom filters' whenever the column's filters are modified does not give the end-user any meaningful information. I agree with @StefanIvanov, that it would be probably better to expose an input for the label.

DiyanDimitrov avatar Nov 04 '20 13:11 DiyanDimitrov

I expected that a name of the custom filter would appear in the list item, not just "Custom Filter". Buf it this item of the ESF dialog is templatable, maybe it is just enough.

hanastasov avatar Nov 04 '20 13:11 hanastasov

Still, let's ignore the filter label for now. Even when the "Contains" filtering condition is chosen in the dropdown, the corresponding input allows entering numbers only, as if this is a numeric filter.

hanastasov avatar Nov 04 '20 13:11 hanastasov

We had a discussion about this issue and we have agreed that this is a feature request.

In order to provide custom label for the conditional filters we can make the igx-excel-style-conditional-filter content settable like this:

<igx-excel-style-conditional-filter>My custom filters</igx-excel-style-conditional-filter>

Also we can provide a template for the filter value input per column like this:

<igx-column>
    <ng-template igxFilterValueInput></ng-template>
</igx-column>

DiyanDimitrov avatar Nov 06 '20 13:11 DiyanDimitrov

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jan 06 '21 00:01 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Mar 08 '21 00:03 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jun 27 '21 00:06 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Aug 28 '21 00:08 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Oct 30 '21 00:10 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jan 01 '22 00:01 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Mar 05 '22 00:03 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar May 07 '22 00:05 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jul 09 '22 00:07 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Sep 10 '22 00:09 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Nov 12 '22 00:11 github-actions[bot]

There has been no recent activity and this issue has been marked inactive.

github-actions[bot] avatar Jan 14 '23 00:01 github-actions[bot]