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

fix(1980): add portal option to DatePicker, MenuPopover, and Popover components #1991

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

luarakerlen
Copy link
Contributor

Summary

Currently we have this problem: 1980.
To fix it, it's necessary to disable portal prop when using Menu and DataPicker, according to discussion at this thread.
To make this possible, it's necessary to add portal prop to DatePicker, MenuPopover and Popover components, so it's possible to define portal as false when using MenuPopover or DataPicker.

Examples

Before

<Menu label="Open menu">
  <MenuItem>Item 1</MenuItem>
  <MenuItem>Item 2</MenuItem>
</Menu>

Result

Gravacao.de.Tela.2024-10-08.as.11.29.04.mov

After

<MenuProvider>
  <MenuTrigger asChild>
    <Button>Open menu</Button>
  </MenuTrigger>
  <MenuPopover portal={false}>
    <MenuItem>Item 1</MenuItem>
    <MenuItem>Item 2</MenuItem>
  </MenuPopover>
</MenuProvider>

Result

Gravacao.de.Tela.2024-10-08.as.11.26.57.mov

@luarakerlen luarakerlen self-assigned this Oct 8, 2024
@luarakerlen luarakerlen requested a review from a team as a code owner October 8, 2024 14:53
Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
shoreline-docs ⬜️ Ignored (Inspect) Oct 8, 2024 2:53pm

@lucasaarcoverde lucasaarcoverde merged commit 43aa37f into main Oct 9, 2024
6 checks passed
@lucasaarcoverde lucasaarcoverde deleted the fix/#1980 branch October 9, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants