WIP: Problem with Debounce and Min. characters options in Filter - Search element

Browser: Chrome 132.0.6834.160
OS: Windows

Hi bricks team,

If we set the Min. characters option to 1 and Debounce to 0 in the Filter - Search element, in the front end after the search (especially if the phrase is long) the Ajax process gets stuck and continues until the page is refreshed.

Please watch the video below.

Hello @HOSEIN,

I’ve tried to replicate the issue locally but was not able to do it. I see you have some custom ajax loader, right? Can you try with just a basic Filter - Search element?

Other than for testing, I think setting debounce to 0 is not something you want anyway. :slight_smile:

Thanks,
Matej

1 Like

Hi Matej,

Thanks for the reply.

I set debounce to 0 to disable the delay for searching. I also disabled Ajax loader but it had no effect. The freeze only happens if debounce is 0.

Other than for testing, I think setting debounce to 0 is not something you want anyway.

But I agree with you in general. I just set it to 0 and felt there was a problem.

Hmm, so you can always replicate it? Do you have a link to the website, where I can replicate it as well?

Matej

1 Like

Hi,

Yes, I’m almost always able to reproduce it when the search term is relatively long or Untidy.

My website
Playground

Hmm, I can reproduce it on your website. On one occasion, I waited for the response to finish, and it took almost 27s to get a response from the server, so this might be the case why it sometimes get “stuck”.

On a Playground though, I was not able to reproduce the long waiting time, but I was able to reproduce the filter not working. I think it happens if you enter just one letter - as soon as you type, it will work. Though, even that way, I’m not able to reproduce it 100% of the time.

Anyway, I got enough info to be able to replicate it, so I opened an internal bug report.

Thank you!
Matej

1 Like

Hi Matej,

Thanks for the detailed review🙏

1 Like