How to clear List View

The problem is …
There isn’t a clear list block on kodular listview :thinking:

Its not so hard…
If it is a listview set
its elements to [empty list]
If it is a listview image ans text use ListViewImageAndText.ClearList block

1 Like

Can you show your blocks how you doing this?

I getting data from firebase

1 Like

this can solve
blocks

We will add a block for it.

2 Likes

app is crashing after using that new clear listview block

2 Likes

Does not work work List View.Clear List block. its showing error.

component_method
Thanks :disappointed:

1 Like

And what error is that?

1 Like

Runtime Error
undefined
Note: You will not see another error reported for 5 seconds.

Its my blocks
blocks (2)

Thanks

And how does your list look at that moment you use the clearlist block?

1 Like

This is before clearlist

This is when button click for clear list

Try this. I solved the problem.blocks (5)

5 Likes

Hello I have the same problem as this topic as I want to clear an item from the list and I have to try to make an empty list and empty string but things appear double.
I use dynamic cards with images and labels so as to make a girdle view.
So is there anyone who finds a solution to this even replace all list I think will be helpful to me.

@surveyorasst, You can set the list items as empty text so that it acts that it is cleared.

I have the same problem as you. Could you solve it?

I have tried this and not work because it becomes an empty string and the list still remains there, I have tested it I got that error, and when I create another empty list and call again add the item to the list It shows that the item duplicates in the list.

I have tried this and seem to solve the problem.

  1. Don’t add again items to the list after calling them.
  2. Make the move from one screen to another if you want to call another data in the list.

The solution i post here is for Kodular List View component, not for Dynamic Component by @yusufcihan.
Please don’t confuse other members with your question !!!