-
Notifications
You must be signed in to change notification settings - Fork 640
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
Add support for nested attributes in groupBy
filter
#1276
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1276 +/- ##
==========================================
- Coverage 89.53% 89.41% -0.12%
==========================================
Files 22 22
Lines 3020 3043 +23
==========================================
+ Hits 2704 2721 +17
- Misses 316 322 +6
Continue to review full report at Codecov.
|
@fdintino should i make PR against your dev branch aswell? |
This is the code I'm using to achieve the same effect: This is a filter I'm using for Nunjucks in Eleventy:
Sample (actual) usage:
Acknowledgement: Code based on whatterz/includes.js |
Now it should work out of the box (when it gets merged) |
Don't worry about the conflicts, I'll take care of those. I'll try to set aside some time, if not today, then this week to give feedback or merge. |
@fdintino can you start from |
Sure, will do. |
c4079d1
to
ec6ef6d
Compare
Codecov Report
@@ Coverage Diff @@
## master #1276 +/- ##
==========================================
+ Coverage 89.56% 89.64% +0.08%
==========================================
Files 22 22
Lines 3027 3043 +16
==========================================
+ Hits 2711 2728 +17
+ Misses 316 315 -1
Continue to review full report at Codecov.
|
@fdintino this PR is ready for review ;) |
A small observation: the behavior here doesn't respect If you did want to use the value of |
@fdintino i have add support for this option. I just throw it inside function, hope it would be handled somewhere above. |
ce7ed46
to
1e29863
Compare
@fdintino everything is OK? |
Yep, everything is fine. Sorry, had to step away for a bit when I was in the middle of preparing for merge. |
Summary
Proposed change:
Add support for nested attributes access for
groupBy
filter to match Jinja2 behaviourCloses #1198 .
Checklist
I've completed the checklist below to ensure I didn't forget anything. This makes reviewing this PR as easy as possible for the maintainers. And it gets this change released as soon as possible.