Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

Add "appendTo" functionality to dropdown #4467

@jaydiablo

Description

@jaydiablo

I noticed there were a couple of PRs for the modal component that try to do something similar, this would be for the dropdown component.

I have an interesting use case where append-to-body isn't quite what we need, but not having it suffers from the issues that append-to-body was made for.

This was actually mentioned in #4240 (second comment) which is demonstrated by this plunkr: http://plnkr.co/edit/1EuLWcCSv47tCi7i5H6N?p=preview

Like the plunkr, I have a static body element that contains a scrollable div, which is where the dropdown toggles are. If the dropdown is opened (and appended to body), and the user scrolls, the dropdown body stays in place (since it's appended to body, and the body isn't the element that's scrolling).

Appending inline (default behavior without append-to-body) doesn't work in this case, as the element that the dropdowns will appear in may have hiding overflow, so the dropdowns will appear cut off.

I'd like to look into adding an "appendTo" (dropdown-append-to) feature to dropdowns so that I can pass in an element that the dropdown body would be appended to.

Thoughts on this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions