ListView FilterBar

Hello everyone
Could anyone tell me how the ListView FilterBar works?

I have a spreadsheet with 2,000 rows and 3 columns stored in a variable.
Searching for Listview’s FilterBar, it looks like magic !! The search result is acquired instantly.
But if you use the textbox, the result (.On Text Changed), causes the app to crash.

Why does this happen?

Summary

Delay:

No Delay:

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

Here

I am also eager to know the difference between these two procedure from the moderators or from the experts .

1 Like

Discovery of the year !!
Just wait . . . Soon we will know! :thinking:

Where do you initiate the listener (using block) ?

image

What do you mean by listener? Any dynamic component that I failed to learn?

Oh sorry, you have the built in component…

The only point that makes me think here, is the fact that the search is so slow using the textbox.
It makes no sense to me.

your for each item in list solution is slow for the numer of records (2000)
let me suggest you to use the local Sqlite database for that purpose…

SELECT column1, column2 FROM myTable WHERE column3 LIKE '%Textbox1.Text%"

Taifun

Oh yeah. The consultation would be better.
But about the title, why is the query in the textbox so slow and not in the listview?

ps: Is there any way to insert the text in the textbox and go to the query search field inside the listview?

the filter in the listview is fast, because it is done in Java, for details see the sources

no…
alternatively you can use JavaScript toegether with the webviewer component for another fast solution

Taifun

1 Like

Thank you for that.
I’m going to research about it, but … if I have a guide for that, I appreciate the sharing.

One last question:
It is possible to increase the size of

nope
you can’t change its size, design, etc

It would be perfect if you could type in the textbox and receive the value there or just increase the size of the layout.

Well, thanks for the explanation!

Anyone who, like me, encounters crashes when filtering data from a large list and displaying it in a listview using the “When ‘textbox’ .On Text Changed” block, know that adding the “Timer” will prevent your smartphone freeze for a few moments while typing new characters !!

image

No need to freeze just use if the length of the text is greater than 3or4 make it to show the filtered list

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.