I am making a todo app with delete service and instead of clicking a certain item in the list to delete it i want to a click a button that will delete every single item currently in the list.What should i do and is there a certain JS i need? thanks
I am making a todo app with delete service and instead of clicking a certain item in the list to delete it i want to a click a button that will delete every single item currently in the list.What should i do and is there a certain JS i need? thanks
Hi Emma,
If I understand you correctly, you should save object IDs in an array: http://docs.appery.io/documentation/r...
Then on listitem click event delete a Database record by array index.
i am confused on what you mean by save object IDs in an array...
Hello! You have to invoke Delete service as many times as many records you need to delete, every time you delete record with a specific _id. Here is more information http://docs.appery.io/documentation/b... (see Deleting Objects section). The way you retrieve all these records _id depends on your app logic and page structure. Please try and contact us in case you have specific question.
Hi Emma,
When you multiple components using a service (as listitem) names will also be duplicated. So to write taskId variable run this JS on listItem click:prevar taskId = $(this).find("[name=taskId]").text();
localStorage.setItem("taskId", taskId );/pre
i also just tested switching the 2 and 3 actions of the mobilelistitem but that did not work either
i am actually all set thanks
Emma,
Glad it's done. Thank you for the update!