Setting select component to null

I have a select componenet, which is empty initially, what I want is, if value is selected from dropdown then if I click on button, the select returns to its original state(empty).


I tried working both with-
event handler on button as-
Select.setValue(" ") or select.setValue(null)


But nothing is working.

Please help me I have to make release of my application today.

Select component is the worst component in the retool, which is/will creating many problems.

Hi!
You could put your search options in a form: the form has a "reset after successful submit" option that works nicely and you can choose if you want the header and footer of the form.
I hope it helps!
image

@Meline I have a different usecase.


See the UI, On clck of "clear selection" I have to remove every input value and so for select

In form, only After API call it will reset, But in my case user can any time, click on clear selection to clear the fields

@Meline Please help me out, it's urgent for release

Hmmm, you could change the submit button so it triggers on click an empty query that does nothing but 'validate' the entry. It will then clear each one of your fields! @ishi8

I didn't understand, can you sent me screenshot of this workflow


image
Just move your fields in the form and it should work.

I am doing same but select.setValue("") is not working

It's not the same. You're running a script that sets values to "".
What I'm showing you is the "Form" element, when you place another element they will be linked to the form and reset event with a clear query: with the solution I provided you, you don't have to write anything in the clear selection query since its just there to clear the dropdowns which will happen thanks to the "Reset after successful submit".
You should try it this way.

I am once again trying, and let you know



What I am doing

I have binded that empty query 2 with both button and form with submit ebvent handler

@Meline Can't there be a way by triggering query and waht's the mistake in using setValue with select componenet

Hi @ishi8! Not being able to clear the value of a select component in the UI looks like a regression on our end. We're looking into this urgently now! I'll make sure to keep you updated

Looks like the fix is now live! Would you mind refreshing your app to see if it works for you again?