Skip to content

Commit

Permalink
feat: add active css class in Stepper.item_is_current_check()
Browse files Browse the repository at this point in the history
  • Loading branch information
EdoStorm96 committed Oct 1, 2024
1 parent dc1dec1 commit 8ebd455
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions proposals/utils/stepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def item_is_current_check(self, item):
"""
if not self.current_item_ancestors:
if item.is_current(self.request):
item.css_classes.add("active")
self.current_item_ancestors = item.get_ancestors()
for item in self.current_item_ancestors:
item.is_expanded = True
Expand Down
1 change: 0 additions & 1 deletion proposals/utils/stepper_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def is_current(self, request):
until is_current returns True.
"""
if request.path == self.get_url():
self.css_classes.add("active")
return True
return False

Expand Down

0 comments on commit 8ebd455

Please sign in to comment.