Skip to content
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

ix-menu-category not expanding #1436

Open
2 tasks done
umeWaheed opened this issue Aug 21, 2024 · 10 comments
Open
2 tasks done

ix-menu-category not expanding #1436

umeWaheed opened this issue Aug 21, 2024 · 10 comments
Labels
type: bug Something isn't working Workflow: Issue created JIRA issue is created and will be analyzed

Comments

@umeWaheed
Copy link

Prerequisites

  • I have read the Contributing Guidelines.
  • I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

What happened?

I'm using ix-menu-category for a nested menu

The following has been observed:

  • The menu expands if I set active=true on any of the sub menu-items
  • The menu expands if I directly hit url of any sub menu-item
  • The menu does not expand if I use any internal link within the application to navigate to sub menu-item page

What type of frontend framework are you seeing the problem on?

React, Others

Which version of iX do you use?

v2.0.0

Code to produce this issue.

import {
  IxApplication,
  IxMenu,
  IxMenuCategory,
  IxMenuItem,
} from '@siemens/ix-react';
import React from 'react';

export default () => {
  return (
    <IxApplication>
      <IxMenu>
        <IxMenuItem home icon="home">
          Home
        </IxMenuItem>
        <IxMenuItem icon="globe">Normal Tab</IxMenuItem>
        <IxMenuCategory label="Top level Category" icon="rocket">
          <IxMenuItem icon="globe" onClick={() => {
                router.push('/path');
              }}
              {...{ active: location.split('/')[1] == 'path' }}>
              Nested Tab</IxMenuItem>
        </IxMenuCategory>
      </IxMenu>
    </IxApplication>
  );
};
@umeWaheed umeWaheed added the triage We discuss this topic in our internal weekly label Aug 21, 2024
@matthiashader
Copy link
Collaborator

Hello @umeWaheed ! Can you verify this behavior in the latest version(v2.4.1)?
I have tried recreating your usecase: https://stackblitz.com/edit/1zkw8s?file=src%2Fvertical-tabs.tsx
As far i can tell it works without any problems.

@matthiashader matthiashader added the wait for response Wait for author response label Aug 26, 2024
@umeWaheed
Copy link
Author

sure I'll try

@umeWaheed
Copy link
Author

@matthiashader the issue is with the category not expanding when you navigate by clicking on page-1 or page-2 buttons as it does for Default link to page-1

@matthiashader
Copy link
Collaborator

matthiashader commented Aug 27, 2024

Thanks for clarification - i think i got you now, you mean this behavior, right?
2024-08-2707-08-29-ezgif com-crop

@matthiashader matthiashader added type: bug Something isn't working Workflow: Issue created JIRA issue is created and will be analyzed and removed triage We discuss this topic in our internal weekly wait for response Wait for author response labels Aug 27, 2024
Copy link
Contributor

github-actions bot commented Aug 27, 2024

🤖 Hello @umeWaheed

Your issue will be analyzed and is part of our internal workflow.
To get informed about our workflow please checkout the Contributing Guidelines

JIRA: X-1625

@umeWaheed
Copy link
Author

@matthiashader yes. The category is only being set to active but not expanding. However, if you reload the same page, it expands.

@umeWaheed
Copy link
Author

@matthiashader Moreover is there a way to set ix-menu-category expanded by default?

@matthiashader
Copy link
Collaborator

@umeWaheed yes, this is possible with the "startExpanded" property. (Note, acc. to documentation: "If set the menu will be expanded initially. This will only take effect at the breakpoint 'lg'.")

@umeWaheed
Copy link
Author

@umeWaheed yes, this is possible with the "startExpanded" property. (Note, acc. to documentation: "If set the menu will be expanded initially. This will only take effect at the breakpoint 'lg'.")

@matthiashader this property is available on ix-menu, I wanted to ask if this something similar is available for ix-menu-category component. I want the menu to be expanded like this by default

image

@matthiashader
Copy link
Collaborator

@umeWaheed Thanks for clarification, i read out there. Yes you are right, currently this is not possible - i have talked to the UX colleagues and they have nothing against it, so i will pass this also as a requirement in to our backlog!
Internal ref: [IX-1650]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working Workflow: Issue created JIRA issue is created and will be analyzed
Projects
None yet
Development

No branches or pull requests

2 participants