Clear InputValue of Selection Doesn't Work

Not sure if this is a bug, below is the situation👇
I have a select component and its search is fuzzy match, Clear inputValue on change is true, I will clear the selection value when I focus on this component:

  1. When I input some text to search option, the related options will correctly highlighted in my dropdown list. But after I chose one option and focused on this component again(clear value should have triggered), the option dropdown still has highlight. At the same time, the state of this component says its inputValue is ""

Screenshot 2025-03-24 at 16.07.37

  • Details: My retool version is 3.75.26

Hello @TT030,

You’re right! The previous search remains visible when typing or searching for an option, then clicking outside and reopening the select input. This might not be a bug but rather cached memory behavior.

You can try this approach to reset it:

select1.clearValue();

select1.setSearchText(" ");
setTimeout(() => {
select1.setSearchText("");
select1.open();
}, 0);

This might help resolve the issue. Let me know if you run into any problems!

5 Likes

Thanks for your help! @WidleStudioLLP I ran your script but the '.setSearchText is not a function' error occurs. Does it have anything to do with my retool version?

Hey @TT030 ,

apologize for any inconvenience. As an alternative, you can try using this script:

select1.clearValue();
setTimeout(() => {
    select1.open();
}, 0);

This should work without causing any functionality errors.

5 Likes

Thanks @WidleStudioLL
I found a topic that encountered the same issue, and this IS a bug that hasn't fix yet. Reference: Reset form does not clear out dropdown search values

Hi @TT030,

Apologies for the inconvenience.

It looks like this is a known bug and the thread linked by @WidleStudioLLP does have a ticket created for our engineering team.

It looks like its status is 'triage' so it should be getting some attention soon. I just tagged this thread onto that ticket as well and will update this with any news I hear from the engineering team!