vmware-clarity / ng-clarity

Clarity Angular is a scalable, accessible, customizable, open-source design system built for Angular.
https://clarity.design
Other
346 stars 78 forks source link

Close button on clarity datagrid default filter does not clear the input value in the filter. #694

Closed DhanashreeSathelkar2020 closed 10 months ago

DhanashreeSathelkar2020 commented 1 year ago

This is a bug report for the @clr Angular or UI versions of the design system. For the web-component implementation of Clarity (@cds), visit vmware-clarity/core.

Describe the bug

When user type any value in filter and click on close button the filter pop up is hide. How can we clear the filter data on close button. Can we have a event emitter to catch this event?

How to reproduce

https://clarity.design/documentation/datagrid/built-in-filters Please check the current filter behavior. Close button in the filter just close the filter pop up, does not clear the content.

Steps to reproduce the behavior:

  1. Go to datagrid column with filter
  2. Click on filter and type some values
  3. Click on close button, it just close the filter pop up image

Expected behavior

Please provide an option to clear the content in filter search. suggestions: 1. close button should clear the content

  1. event to capture the close event.
  2. clear content option on filter

Versions

Clarity version: 5.2.0

Framework version: Angular 11

Device: Laptop /Desktop

kevinbuhmann commented 1 year ago

I must be missing something here. Clearing the input value would reset the filter making it basically unusable.

MTstomachTM commented 1 year ago

I agree with @kevinbuhmann. This will affect UX negatively. What if user want to see the value behind the filter dropdown? Clearing the filter value will trigger clrDgRefresh event and change the result shown inside datagrid which defeats the purpose of filtering it.

But if what you mean we need another option to clear the filter value (like another button, for example), I agree. Especially if we need to reset the value for the default filter for number column type.

My current solution: just create a custom filter that fits your need.

kevinbuhmann commented 10 months ago

This is not a bug.

github-actions[bot] commented 9 months ago

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.