Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ember-infinity demo as Ember Twiddle for presenting issues #165

Closed
openhouse opened this issue Jun 15, 2016 · 2 comments
Closed

ember-infinity demo as Ember Twiddle for presenting issues #165

openhouse opened this issue Jun 15, 2016 · 2 comments

Comments

@openhouse
Copy link

ember-infinity forever!

Here is the ember-infinity demo as an Ember Twiddle. People could fork this to mock up their issues. This could be something for the docs? https://ember-twiddle.com/c08988c41ef999bc0ef34bb0d92c17e5

Ember Twiddle is a great JS Bin sort of thing which lets you use addons in an ember-cli style layout.

I made this on my way to mocking up an issue I'm having (HeroicEric/ember-group-by#12). I want to group items from an infinityModel. But it seems that using ember-group-by causes the DOM for whole list to redraw whenever ember-infinity adds new items to the model. This slows with each page. Any tips on how to group infinityModel items would be appreciated!

j a m i e

@hhff
Copy link
Collaborator

hhff commented Jun 23, 2016

yo @openhouse ! this is a little tricky. In a situation like this, I'd try keeping the infinityModel array privately, and then creating the groups based on the data in the infinityModel, via the afterInfinityModel hook.

Check it out:
https://github.com/hhff/ember-infinity#afterinfinitymodel

Not sure this approach would work out of the box with ember-group-by, but looking at the logic there, it shouldnt be all that hard to replicate & modify for a data source that's getting larger & larger over time.

Please re-open if this doesn't quite solve your problem!

@hhff hhff closed this as completed Jun 23, 2016
@openhouse
Copy link
Author

@hhff I will try this, thanks!

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

No branches or pull requests

2 participants