Refresh One List Item
Is there a way to refresh one list item without reloading the entire list? I'm trying to edit variables in one list item, but it is changing all of the values.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Is there a way to refresh one list item without reloading the entire list? I'm trying to edit variables in one list item, but it is changing all of the values.
Hi Doug,
Can you show the code you tried?
All I had tried at this point was to invoke the service for the list. I just wasn't sure if there was a way to refresh only one DIV or list item. I've looked at some JQuery ways that I will try, but wanted to see if you had some advice for me.
Thanks Illya!
Try something like this: pre$("#list1").listview ("refresh");pre
-- list1 - is your list element you want to refresh./pre/pre
Thanks! I'll try it after the update is over!
I just tried the code. Didn't work. Any other ideas?
Doug, please can you post some code example that you using now, and what you want to get as a result?
Happy to!
I've created a list that individuals can submit requests to. I want to be able to click a "Like" button to add to a counter for that particular request.
I have the service set up to like the request and add to the counter. However, I want to limit each user to like a request ONLY once (so to avoid spam). The person doesn't register to gain access to the list, and I'm trying to avoid creating another collection to log each click.
So, I want to be able to read when a person clicks the "Like" button. Then, I had thought to write it to a label in the list and change the color of the "Like" button. However, when I had changed values and colors in the list item, nothing happened. Then, if I called the List service, it changed every list item.
I hope this explains it!
Hello! Could you please post the code you use to change values and color?
I did it through events after the click.
Upon "success" of the service, it would:
Change the picture asset via Javascript (example: Appery('picturename').asset('src','URL'),
Change the text of the Notation Label from false to true (true meaning you clicked on it and should not be able to click on it again).
Change the text below it to say Thank you.
Invoked list service.
Forgive me I don't have actual pictures, as I had to rebuild some it last night. This is how I did it, but I'd like to do it via Javascript.