[Inquiry] How can I limit the number of filter items on the igx-grid component? #12951
Replies: 3 comments 2 replies
-
I know well the team is so busy, but is it possible for somebody to suggest any answers or hints to me by the end of this week, May 5th? In case we can't achieve the requirement above at the current version of Ignite UI for Angular, I can accept that conclusion. I want to make a decision by the end of this week. @kdinev, is it possible to coordinate to assign somebody to this inquiry? |
Beta Was this translation helpful? Give feedback.
-
Hi @jsakamotoIGJP, It appears that by default canceling the filtering event does not clear the filter row of the newly added expressions’ UI elements – the filtering operator button and the filtering chip. Moreover, there is not a built-in property in the grid to restrict the number of filtering conditions that can be applied. What I can suggest is the workaround solution demonstrated in this StackBlitz sample. It involves removing the last filtering expression item of the corresponding filtering row when the filtering conditions per column number is exceeded.
This prevents the above mentioned UI elements from appearing at all. Finally, I believe that such a restriction might be slightly confusing to the user, as at least a visual indication of the present constraint has to be included. If you were to share the considerations behind this requirement, maybe we could give alternative suggestions to achieve the target scenario. |
Beta Was this translation helpful? Give feedback.
-
Hi @ddaribo, I'll close this issue now because I could get enough ideas to resolve the root issue on my side. I'll reopen this issue if I get stuck again, but I'm not worried about it for now. Again, thank you so much for responding to this issue, even though the team members must be busy! |
Beta Was this translation helpful? Give feedback.
-
Inquiry
I am trying to restrict the number of filter items on the igx-grid. For example, let's consider the scenario that we need to limit it to only one filter item.
I have managed to apply the first filter item by utilizing JavaScript code to cancel filtering in the "filtering" event handler.
However, the 2nd or later filter items are still visible on the filtering UI, even though they are not functional.
Is there any way to hide these 2nd or later filter items? I understand that you may be occupied, but could someone provide me with a helpful hint?
Beta Was this translation helpful? Give feedback.
All reactions