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

IxDropdownButton's items are lost on window resize #1157

Open
2 tasks done
mertutku opened this issue Mar 12, 2024 · 5 comments
Open
2 tasks done

IxDropdownButton's items are lost on window resize #1157

mertutku opened this issue Mar 12, 2024 · 5 comments
Labels
type: bug Something isn't working wait for response Wait for author response Workflow: Issue created JIRA issue is created and will be analyzed

Comments

@mertutku
Copy link

Prerequisites

  • I have not leaked any internal company information.
  • I have not posted internal links or code snippets.

What happened?

We are using IxDropdownButton inside of a IxTabItem. Initial load of the page, everything works right. But if we resize the page the IxDropdownButton's items are not visible anymore. This does not happen if IxDropdownButton is outside of Tabs components.

Initial state
image

After window resize
image

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

React

Which version of iX do you use?

v2.1.1

Code to produce this issue.

<IxTabs selected={selectedTab}>
        <IxTabItem>
          <IxDropdownButton
            label={"Tab Label"}
            variant="secondary"
            ghost={true}
            outline={true}
          >
            <IxDropdownItem
              label="dropdow item 1"
              onClick={() => changePage(...)}
            ></IxDropdownItem>
            <IxDropdownItem
              label="dropdow item 2"
              onClick={() => changePage(...)}
            ></IxDropdownItem>
          </IxDropdownButton>
        </IxTabItem>
      </IxTabs >
@mertutku mertutku added the triage We discuss this topic in our internal weekly label Mar 12, 2024
@matthiashader
Copy link
Collaborator

Thank you for your comments. Currently the ix-dropwdown is not intended to be used as a tab item. Alternatively, you could use a button group / move the dropdown button down (and then change the content based on the pressed button) or, if you really need nested elements like this, a tree would also be a solution.

@matthiashader matthiashader added the wait for response Wait for author response label Mar 13, 2024
@matthiashader
Copy link
Collaborator

After a discussion, we came to the conclusion that this behavior is not desired, even if it is not currently supported. We will create a bug ticket - thanks for submitting it.

@matthiashader matthiashader added type: bug Something isn't working Workflow: In progress Issue will be part of the next release 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 Workflow: In progress Issue will be part of the next release labels Mar 19, 2024
Copy link
Contributor

github-actions bot commented Mar 19, 2024

🤖 Hello @mertutku

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

JIRA: IX-1013, IX-1736

@mertutku
Copy link
Author

mertutku commented Mar 20, 2024

Thank you for the response. I resolved the problem with a workaround. In case, it might help you. Basically I switched to IxDropdown instead of IxDropdownButton. And moved the IxDropdown item outside of IxTabs block.

<IxTabs>
  <IxTabItem id="triggeringTabId">
    <div>
      tabName
      <IxIcon name="chevron-down-small" class="icon size-24"></IxIcon>
    </div>
  </IxTabItem>
</IxTabs>
<IxDropdown trigger="triggeringTabId">
  <IxDropdownItem
    label="tab1"
    onClick={() => changePage(...)}
  ></IxDropdownItem>
  <IxDropdownItem
    label="tab2"
    onClick={() => changePage(...)}
  ></IxDropdownItem>
</IxDropdown>

@matthiashader
Copy link
Collaborator

Hello @mertutku,

We have discussed this use case previously, and unfortunately, our current implementation does not support this scenario. However, you can use the workaround we discussed.
But we would like to understand the use case behind your requirement to potentially enhance our component in the future.
Feel free to share more details or contact us directly at: [email protected].

@matthiashader matthiashader added the wait for response Wait for author response label Jul 4, 2024
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 wait for response Wait for author response Workflow: Issue created JIRA issue is created and will be analyzed
Projects
None yet
Development

No branches or pull requests

2 participants