iron-pages icon indicating copy to clipboard operation
iron-pages copied to clipboard

Allow restamping

Open nicholaswmin opened this issue 8 years ago • 4 comments

As it is right now, iron-pages doesn't provide for a way to destroy non-currently viewed pages and restamp them when they come back into view.

Providing a property that does this (perhaps restamp), would allow for significant performance improvements when navigating through complex DOM chunks with multiple levels of nested iron-pages.

There's potential hacks around this using <dom-if> but they don't really scale well for many subpages and they result in convoluted markup, see this S.O question

nicholaswmin avatar Dec 09 '16 10:12 nicholaswmin

+1 for this! Btw, I found this related blog post: http://nader.tn/2015/07/polymer-element-recreation/

Boscop avatar Feb 18 '17 17:02 Boscop

+1 Missing this feature very much. Btw, I found this https://github.com/TimvdLippe/iron-lazy-pages built on top of iron-pages Why cant the same be implemented in iron-pages?

JunedS avatar Feb 25 '17 19:02 JunedS

I have just pushed support for dom-if in iron-lazy-pages. The implementation is rather naive: just mimic the if property to the selected/deselected to trigger the dom-if restamping. Check it out at https://github.com/TimvdLippe/iron-lazy-pages/pull/56

TimvdLippe avatar Jun 06 '17 10:06 TimvdLippe

Do like this image Do not forget to put the "div" because iron-page needs that to manage and create equal fonction in your script like this image

tandacedric avatar Jul 09 '18 21:07 tandacedric