Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

listview('refresh') does not update data-icon #3035

Closed
offsky opened this issue Nov 12, 2011 · 3 comments
Closed

listview('refresh') does not update data-icon #3035

offsky opened this issue Nov 12, 2011 · 3 comments

Comments

@offsky
Copy link

offsky commented Nov 12, 2011

If you use javascript to change the icon for a listview row, there is no way to refresh the list to cause the new icon to take effect. Calling listview('refresh') will not update the data-icon.

Example:
http://jsfiddle.net/HyL9n/2/

The example will show that listview('refresh') will work to add a new row, and it will work to update the count bubble, but it will not work to change the icon.

@toddparker
Copy link
Contributor

At the moment, I believe refresh only enhances new nodes, it doesn't re-parse the already enhanced nodes because that would be too heavy. If you wanted to have the framework re-load a node if you changed something about it, just remove the LI and replace it with a new one and call refresh.

@offsky
Copy link
Author

offsky commented Nov 14, 2011

Well, some parts of the existing enhanced node is being refreshed because I can add/remove a count bubble and it gets re-enhanced when I call listview('refresh'). It just appears to be the icon that can't change.

Can I suggest that we make a more elegant solution than destroying and recreating a row? Maybe .listrow('refresh') that we could call on an individual row to refresh it? Or, even better would be a general purpose refresh function that we could call on any collection of nodes to cause them all to get re-enhanced. Something like $('.needs-refresh').refresh();

@toddparker
Copy link
Contributor

I just tagged this as a feature request. WOuld you mind adding a link to this issue from the feature request wiki page so we can give this another look post-1,0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants