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

Instances of page-numbers trigger errors with certain attribute orders #242

Open
jasonmevans opened this issue Mar 14, 2018 · 1 comment

Comments

@jasonmevans
Copy link

I discovered this issue just now while implementing pagination in my project. The underlying stack trace and error messaging surrounding the issue were not clear, so I did a bit of digging into the ember source code. It seems that the way this project requires properties to be passed into the page-numbers component causes an exception when content does not come first.

currentPage: Ember.computed.alias("content.page"),

The reason being that on this line the currentPage property is a bound alias to content.page. Now, if currentPage comes before content you will receive a console error saying, "Property set failed: object in path "content" could not be found or was destroyed."

{{page-numbers currentPage=page content=results }}

screen shot 2018-03-13 at 4 51 58 pm

If the order is changed to this then the error will be resolved:

{{page-numbers content=results currentPage=page }}
@Redsandro
Copy link

Redsandro commented Oct 15, 2019

I'm experiencing the same, and similar issues the other way around.

Is there a similar ember-cli module that works with property names as used in the JSON:API documentation for pagination? I'm having to do a lot of guesswork for undocumented things (such as nested properties), so I would rather try something that works with zero configuration.

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