Reset Relevant Input not reseting search input

I have a filter and search system above a table to filter table content.

I have an eraser button next to the search input to reset filters and I also want it to reset the search input.

image

My workflow calls a custom event to rese filters and also relevant inputs.

However, the search input doesn’t get reset and the text remains.’

What am I doing wrong?

Hey @umiumansa :wave:

The reset ‘relevant’ inputs means that it resets inputs that are used in the workflow. You aren’t using the input in a workflow so it won’t reset. As a trick, you can use it to set a state, then reset the input and it should then clear out for you. Does that make sense?

Let me know. :blush:

2 Likes

Ah :bulb: !

I didn’t realize that. Excelent idea. I already had a state for normalizing the string, so I can use just that and it works.

Thanks a bunch!

1 Like

Note: as a result from this setup I realized an unwanted side effect raised here. Namely, the use of the state of the input in the erase workflow causes the input and the button to be bound in both directions. So pressing enter on the input will trigger the erase button.

Hmm :thinking: Does it help if you tie it to two buttons?

Maybe try adding a condition on the set state ‘only when that input is not focused’?

1 Like

There is no “input focused” condition on workflows. It’s only available on UI.

FYI… there is a loophole where you can copy an is focused condition from an element into a workflow. True, it’s not officially supported, so Bubble could fix the loophole at some point and break your functionality, but it’s still a thing.

2 Likes

Finally I resolved it on the UI by placing the below condition on the erase button:
image

1 Like

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