-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Manually add item to infinity.model #383
Comments
Do any of these methods help? https://github.com/ember-infinity/ember-infinity#service-methods If you have any code examples, we could probably solve this with existing methods or improve the API here. |
@snewcomer I have similar situation to @Redsandro. I have a list of processes that I'm infinitely scrolling and at the top of the list there is a button that creates a new process by making an api call to the server when clicked. At the moment, I'm force to refresh the current route when the button is clicked so that ember infinity can load up the new item that was created on the server side. Can you suggest to me any other alternatives? The only other thing I can think of doing is |
I saw that you had a section for cursor based pagination that deals with duplicated items based on an id and a timestamp when appending new items to the list(and removing previous items but that is not allowed yet in the application so not an issue at the moment). Based on what I said, do you think that is what I should go for? |
@snewcomer I'd like to try |
Oh! It's an Ember-native method! This makes me wonder if there is a way to keep a list of links to objects in the model, and when ember-infinity is It would be a good start towards: |
Does https://github.com/ember-infinity/ember-infinity#static-parameters |
I think unshift would work for prepending. I have not tried it yet because I went another way, but this specific issue is closed. For now. :) |
I have a page that's polling the server for new items. They will be prepended to the list and marked as "new".
Now that I replaced my model with
ember-infinity
, I can't figure out how to do this (or if it's possible).Can I manipulate the
infinity-model
and prepend an item?Cursor-based pagination for older items when scrolling down will continue to work fine.
The text was updated successfully, but these errors were encountered: