You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I would like to understand how to correctly handle table view row deletions with FunctionalTableData. I understand that we should not work with indexes, however right now this is what I came up with:
My intuition was that I needed to create a new CellAction, however, I'm not entirely sure how to handle the data deletion from the array (it's not working well, more specifically when I try to delete any row the last row gets deleted). I would appreciate any help with this, thanks!
The text was updated successfully, but these errors were encountered:
Given that the library checks for the key first and then the equality of the states in all cells, by making your cells using keys of numbers; Will make it that when you delete an item, all of them will be different given that their key becomes pretty much this id-\(index-1).
key: "id-\(index)",
I would suggest keeping the same code you have here but change the key to something meaningful and unique to your Translation, like key: item.id, for example
Hi, I would like to understand how to correctly handle table view row deletions with FunctionalTableData. I understand that we should not work with indexes, however right now this is what I came up with:
My intuition was that I needed to create a new
CellAction
, however, I'm not entirely sure how to handle the data deletion from the array (it's not working well, more specifically when I try to delete any row the last row gets deleted). I would appreciate any help with this, thanks!The text was updated successfully, but these errors were encountered: