Skip to content

v-repeat with filterBy within other v-repeat #589

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

Closed
kvdmolen opened this issue Nov 24, 2014 · 4 comments
Closed

v-repeat with filterBy within other v-repeat #589

kvdmolen opened this issue Nov 24, 2014 · 4 comments

Comments

@kvdmolen
Copy link

I can't get this working:

countries = [
  {name: "Brasil", id: 1}
],
cities = [
  {countryid: 1, name: "Sao Paulo"}
]
<div v-repeat="countries">
  <div v-repeat="cities | filterBy id in 'countryid'">
    ...
  </div>
</div>

Something wrong? I keen ketting undefined is not a function (tried with various quote-options and also $parent.id instead of id does not work).

Many thanks,
Klaas

@yyx990803
Copy link
Member

Thanks, indeed a bug, fixed in latest commit.

@kvdmolen
Copy link
Author

Cool thanks. Could you include a build in the commit?

@yyx990803
Copy link
Member

I only commit build files in releases - you can modify your local copy according to this: https://github.com/yyx990803/vue/blob/6f0a1d02dd78866a9a8fcf323239289afcb1b211/src/filters/array-filters.js#L25

@kvdmolen
Copy link
Author

Works like a charm! 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