Autocomplete Search Filter refreshes records after a second

Hi,

I have added a filter and converted it to an Autocomplete element. The Autocomplete is working correctly by searching records from the database. When I select the search text, the records are filtered correctly based on the selection criteria.

However, the filtered records display only for a second. Without any input, this section on the page refreshes to display all records from the database.

The search filter works correctly without the Autocomplete function. I am applying the autocomplete search filter to a repeat query.

I have included a short video showing the issue. Is there a setting I have missed in setting up the Autocomplete function?

You should probably post a link so we can take a look

Here’s a link to the test page.

https://demo2.suryasoftware.com.au/test.html

It looks as if the page is performing two searches.
20200711_search

It seems to me you are using the same server action for the autocomplete as the one used to list the records on the page. So when you enter something and select it, it filters the server action and resets the autocomplete which resets the records again …

You just need to create a separate server action for the autocomplete and not use the same one you are filtering using it :slight_smile:

Thank you for pointing me in the right direction. I have set up a separate server action to search for the customer names for the search filter and it is working as expected now.

I appreciate the assistance :slightly_smiling_face:

1 Like

This has also helped me with a similar situation. Thanks

1 Like