I have made a list and shown dynamic label in the dynamic cardview
List:-
Mango
Banana
Pineapple
Mango
Lichi
So as you can see there are 2 mangoes in the list.
I want that if any of the mango cardview clicked then if more than 1 mango containing item got deleted. So here both mango should be deleted.
How can I do this.
I tried it but was getting error. I was using each item block.
What was the error?
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.
Option 1 Then use your main list for this purpose. When component is clicked first get index, using this index take the clicked item from the global list, then find the duplicate items index numbers then by using this number del the ids.
Option 2 get index of the clicked card, get tge text of the item to be checked, the loop from 1 to total length of cardview id,
If the clicked item matches with loop item get text
Then delete the card view id
Else do nothing
Option 1 can be achieved easily by using an extension with limited blocks. ListNinjaextension can be used to find the index places of duplicate items quickly