Skip to content

fix: auto close for sub-navigation click #4522

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

nmerget
Copy link
Collaborator

@nmerget nmerget commented Jul 10, 2025

Proposed changes

closes #4189

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

Copy link
Contributor

🔭🐙🐈 Test this branch here: https://db-ux-design-system.github.io/core-web/review/fix-close-on-click

@nmerget nmerget moved this to 👀 In review in UX Engineering Team Backlog Jul 10, 2025
@nmerget nmerget enabled auto-merge (squash) July 11, 2025 06:15
handleNavigationItemClick: (event: unknown) => {
if (isEventTargetNavigationItem(event)) {
handleNavigationItemClick: (event: any) => {
if (event?.target?.nodeName === 'A') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (event?.target?.nodeName === 'A') {
if (event?.target?.nodeName.toLowerCase() === 'a') {

@@ -130,7 +130,7 @@ export type PlacementProps = {
};

export type NavigationBehaviorState = {
handleNavigationItemClick: (event: unknown) => void;
handleNavigationItemClick: (event: any) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you switch from unknown to any ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

DBNavigation sub-navigation not closing after navigation is performed
3 participants