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

Vue3: CvOverflowMenu position is calculated incorrectly when used inside CvDataTable cell #1524

Closed
OlkaB opened this issue Sep 7, 2023 · 1 comment
Assignees

Comments

@OlkaB
Copy link
Contributor

OlkaB commented Sep 7, 2023

Description

When using CvOverflowMenu within CvDataTableCell, the menu's dropdown position is calculated far outside the table
It should behave like in Vue2 (e.g. see this story https://vue.carbondesignsystem.com/?path=/story/components-cvdatatable--slotted-html)
Browser: Chrome Version 116.0.5845.180
Carbon Design System version: Vue3

Steps to reproduce the issue

import CvOverflowMenu and CvOverflowMenuItem to CvDataTable.stories.mdx and replace content one of the cells like so:

<cv-data-table-cell>
          <cv-overflow-menu flip-menu style="margin: 0 auto;">
            <cv-overflow-menu-item>Edit</cv-overflow-menu-item>
            <cv-overflow-menu-item>Test</cv-overflow-menu-item>
          </cv-overflow-menu>
      </cv-data-table-cell>

image

Additional information

at start table looks correctly:
image

but after clicking three dots menu button this happens:
image

@OlkaB
Copy link
Contributor Author

OlkaB commented Sep 7, 2023

note: The first difference I see here is that menu's dropdown in Vue2 seems to be appended to body, while in Vue3 it stays within a component itself.
After removing inline style it works fine within a table cell:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants