Reset input on click button but not when pressing enter?

So I have a search bar which does not have any button. When the search bar is populated and one presses enter, the data in the RG group below it gets updated.

Then I want a button that will erase the data in the input and reset the data in the table.

I am able to create a button that will have the following action:


It works well when pressing the button.

However, as a result of this, the search bar is automatically linked to this button and whenever a search is made and enter is pressed, it will reset the input after doing the search.

It seems I have only the option to either use a search button and a reset button OR no search button and no reset button.

Although I can appreciate how smart the Reset Relevant Input action is, I aslo wish we had an explicit input reset action to be able to fine tune this kind of behavior.

Any tips?

Are you using an input, or native search, or a plugin?

The button should be disabled if a search hasn’t been done which may stop the enter issue

Using native text input.

Button is an erase search and filter button. So it could be pressed to reset filters even though the term search input is empty. So I cannot disable it the way you suggest.

how about separate buttons for erase search and unfilter and unfilter only (when search is empty)?

This topic was automatically closed after 70 days. New replies are no longer allowed.