-
Notifications
You must be signed in to change notification settings - Fork 309
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
Nested rv-each and indexes #551
Comments
it'd be even better to have something like |
Yep your argument is right. I didn't see the possible confusion with custom delimiters. It's easy to change in the pull request. |
I do think this is a valid issue, I can't decide what the best syntax would be, I do actually quite like the % because there's less chance of a collision with a dev's own property names, but I also agree that it's one more thing to remember. I've replied on the PR anyway, let's continue the discussion there. |
When we have nested rv-each binders, we only have one index. This index is the index of the last rv-each. So we can't us multiple indexes. See this example : https://jsfiddle.net/jccazeaux/cj48q6zq/3/
I cannot access the index of first rv-each
A simple solution would be to not use generic
index
attribute but a dynamic attribute. This attribute would be%<item>%
where<item>
represents the current iterated item (rv-each-[item])In the jsfiddle example, we could access each index like this :
The text was updated successfully, but these errors were encountered: