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

Set appendTo as body by default #1875

Closed
14 tasks done
mertsincan opened this issue Mar 15, 2021 · 4 comments
Closed
14 tasks done

Set appendTo as body by default #1875

mertsincan opened this issue Mar 15, 2021 · 4 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@mertsincan
Copy link
Member

mertsincan commented Mar 15, 2021

Most of the time users need to set it as body so let's make it default.

  • AutoComplete
  • Calendar
  • CascadeSelect
  • ColorPicker
  • ContextMenu
  • Dialog
  • Dropdown
  • Menu
  • MultiSelect
  • OverlayPanel
  • Password
  • SlideMenu
  • SplitButton
  • TieredMenu
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Mar 15, 2021
@mertsincan mertsincan added this to the 6.1.1 milestone Mar 15, 2021
@mertsincan mertsincan self-assigned this Mar 15, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
mertsincan added a commit that referenced this issue Mar 16, 2021
@vrinceanuv
Copy link

vrinceanuv commented Apr 2, 2021

@mertsincan hello there. So overlay has changed pretty drastically. How can one achieve the same behaviour as before? Right now I see you always, but always have to provide an appendTo valid DOM element to the OverlayPanel, which is gonna break anyone's popover everywhere. How can the previous behaviour can be achieved after this update?

The solution for everyone else who want to behave as before would be to make wrapper for this component and use it like this:

<div ref={parent}>
  <OverlayPanel appendTo={parent.current}>
      content
  </OverlayPanel>
</div>

@mertsincan
Copy link
Member Author

Thanks @vrinceanuv, I added "self" value to appendTo property. You can use it. Details;
#1949

Note: In all Prime* libraries, almost all users wanted the appendTo={document.body} by default. That's why we set it as default in all of them.

Best Regards,

@mertsincan
Copy link
Member Author

Hi @vrinceanuv,

Also, I added appendTo option to PrimeReact api. You can change it for all overlay components. Details; #1964
Exp;

// in App or any wrapper component
PrimeReact.appendTo = 'self'

Best Regards,

@vrinceanuv
Copy link

Thank you a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants