Empty search box displaying entire database

I have a search box with custom filter Full name should contain Search term
But if the search term is empty it is showing the entire database. I don’t see a way to stop it.

Hi @trble,

Add a visibility condition to the list that only visible if the input ( search box ) is not empty and try.

Thank you

But this doesnt seem to be a real solution because the data is still being loaded on the backend and that will cause lag? And i see a constant spinning circle for some reason. I don’t know why tehre is a spinning circle when the list should be invisible.

Ah I see. But when I go back and come again or adding the Change Input Value action before coming to this screen and no problem.

Or maybe you can use this component.

But I think in the native app this will be okay.

1 Like

Hi @trble,

Please see here How to hide search results when there is nothing inputed in the search bar? and here adalo misc list filtering - YouTube

Best,
Victor.

3 Likes

Hi Victor,

In your video and that post by Nathan is using the Simple List. But when I use the Custom List it started loading and not stopping unless if I go back and come again or type something in the search box. Is this happening on PWA’s only?
Thank you

spinning
For me when i do what the video says I get this spinning circle that spins forever…
Does not visible mean that it isnt loading the data? I dont want it to load the entire database in the background. Well I guess i could limit the results to 100 to avoid that. But I can’t get rid of this spinning circle. Seems to be a bug.

Is this the Custom List?

Yes its a custom list. It seem to be a bug in adalo. If I click back the spinning circle disappears on next load. But the spinning circle is always there on the first load.

@dilon_perera this is not a good advice. If you add change input value action as on-screen-enter, it will execute EVERY TIME when you click on ANY button on the screen.

@trble @dilon_perera the spinning circle seem to be a bug in Adalo. The workaround which worked for me was to create a group out of he custom list (so the hierarchy is screen → group → list) and adjust the visibility of the group.

Best,
Victor.

2 Likes

Apologies if I gave any wrong advice!

It means the buttons that have no actions?

It worked! Thanks Victor.

2 Likes

Oh that did work thank u
Should I always limit the results of a list? I imagine if it tries to load too much it will crash.

1 Like

@trble This is an interesting question.

Based on what I see in the browser’s network console, the app sends a request to the database each time when I stop printing the characters in the input box. And this request contains filters on column (the value from the input box) and the limit on the records to be returned. Obviously if you limit the number of records returned → this will make the request payload smaller → the app will work faster.

The question is whether this is a “stable behaviour” or not. I remember that the behaviour of limiting the number of records returned was very “dumb” before; it just returned X records without any respect to dynamic filters (like search).

I’d say that it is worth trying in your case. And again, “too much” is 1000s of records - lists display 50-100 records pretty fast.

Best regards, Victor.

1 Like

I see the maximum number of records is below the filter section. So it should limit the results AFTER search has taken place?

If it was before that wouldn’t make sense. It would end up some things from the results.

Because my search goes through all the users, I need to limit the results or the entire database will end up being displayed like what happened before I had the search visibility on always on. I am still curious though that if the visibility is off, is it still requesting all that data.

FYI: There’s definitely an issue with lists!

I have several lists in my app, on different screens. Some screens with more than one list and they show according to the settings in each of them.

Now the lists are not respecting the criteria and they are showing regardless.

I have not touched my lists settings at all. They were working fine until yesterday. Today is when the problem started.

Yes, I can control it by setting a visibility condition, but I shouldn’t have to do that. It was working fine before.

I have opened a ticket with Adalo support.

Yep! Something change with lists.

I had lists to control users with some filters and now those filters are not working.
For example, searching for an “empty” input, now is showing up without any result. (The DB shows that isn’t true).
The same happens with a filter on relationship DB, searching for an specific data… now is showing ALL the users without filtering.

@charleshope any news with your ticket?

I am still talking to them.

They replied to my first message but provided a workaround instead of understanding that the behaviour of lists changed.

I replied with another screen recording providing a further explanation to them. That was only a few hours ago.

I am waiting for their following response.

@nvrjulian I just got a reply.

They now understand what’s happening and are looking into it.

1 Like

Great news! Thanks for the update.

I think the greater issue here is with “empty” states right?
Let me know if you have some fix in the meantime.

1 Like

Yeah, the issue is with empty states. Be that input or dropdown.

There are workarounds, but I don’t want to consume energy on that until there’s confirmation from Adalo on what the final behaviour of lists will be.