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

Passing hasMany relationship into {{#sortable-objects}} #175

Open
ianpetzer opened this issue Sep 25, 2020 · 1 comment
Open

Passing hasMany relationship into {{#sortable-objects}} #175

ianpetzer opened this issue Sep 25, 2020 · 1 comment

Comments

@ianpetzer
Copy link

Hi there,

I'm struggling to pass a hasMany relationship into a {{#sortable-objects}}. It works fine in the simple case of a single sortable list but I'm finding that if either:

  1. Use a single list and set inPlace=true
  2. Use multiple lists and drag from one list to a list to another where the sortObjectList is a hasMany relationship I get the following error:

items.findIndex is not a function

This is coming from:

return items.findIndex(function (element) {
as a hasMany relationship does not support the findIndex function

@ianpetzer
Copy link
Author

This PR #176 solves the issue in my specific case of using an ember hasMany proxy. Would this be usable in all scenarios?

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

1 participant