As you can see in my example above you have to remove from the list only the item. Once you have the new list (with the item removed), you need to store it again into tinyDB.
Again, use the Do it capability to check what is happening with your lists.
My bad. It's not removing all data, rather it's only removing that specific data but the problem is that when that data is remove the value of that index is now zero but my apps is trying to find a value to that index so it's not displaying the other content.
Yes, but it's already empty since, It's was remove, Now I'm trying to do is when that data was remove it would be replace by the next data. so there's would be no error accur.
Hello, So I already resolve the problem with this one, but now the problem is, when I select all items in the list it supposedly removes all items in the list when i click buy, but it's not removing all items but it's displaying a error message.
So here for example: I have 9 items in my chart then select all of them
when it should be removing all item in the list intead this erro pop up
Yes. That the error Im getting even when Im trying to remove is 9 items or all it would say that im trying to remove 6 items with the only items 4, but it's not it's 9
You are removing fixed indexes....so, when you are trying to remove item 6 from a list with, originally 9 items, and you already have deleted 5 items...your list has only 4 elements...so, it gives you the error.
So when user add cart, the system would display it on the other screen there where we would know the item is the first one, so when removing it would remove the 1st one when I select it, the system would always replace the 1st items when it removed, so when 1st index was remove the 2nd index would replace it as 1st.
If you have the productName you want to remove then you can do something like in the example I showed you...to search the index of the item in the list by productName: