How to make a repeater shows a "loading screen" while running filter codes

Hi everyone! So i have this repeater that only .show() after input field is typed (filter all set up and working) and a search button is clicked.

Problem is, when the repeater shows, it display everything in the dataset before the filter finishes running and then it shows the result filtered, wich takes a lot of time because there are 300+ items to filter. This with no indication at all that the porcess is happening, and it gives the impression that the click din’t do anything at all until things finally change.

The question is: how to add a loading item showing that the process is running until its done?
I suppose it’s called preloader, but only found examples for page loading. I thank you for any help you guys can provide.

1 Like

I have been searching for the same thing, loading in a repeater, have you found a solution to this?

Indeed I have. It’s quite simple really. what you have to do is add to your code the following lines:

$w("#loadingWarning").show(); //Show the warning-loading box/image onKeyPress/ onClick of the searchbutton.
            $w("#yourDatabase").onCurrentIndexChanged(()=>{ //this makes the box last until dataset is done "filtering"
                $w("#loadingWarning").hide(); //when load is done, this hides the box (might consider puting in a delay intot he hide function, because even after it loads the dataset itself, it takes some time for the actual repeater to really actualize, and the box disapears 1 or 2 secs before.