Skip to content

appendTo option for dropdown (Must Feature) (e.g. before closing body / near to the dropdown) #1375

Description

@unni2003pj

Currently, the Choices dropdown is always rendered within the .choices wrapper

When the field is placed inside a scrollable container, modal, or element with overflow: auto/hidden, the dropdown gets clipped and becomes partially unusable. Please find the below screenshot

Image

Many UI libraries (Select2, Popper-based components, etc.) provide an appendTo / portal option to render the dropdown outside the local DOM context (commonly document.body) while positioning it relative to the input.

Adding a similar option in Choices would greatly improve usability in complex layouts.


Why this is a must-have

In modern UIs, forms are commonly placed inside:

  • Modals
  • Side panels
  • Scrollable dashboards
  • Fixed / sticky layouts

Without an appendTo option, developers are forced to implement fragile workarounds (manually moving the dropdown to body, recalculating position, handling scroll/resize), which defeats the purpose of using a library.

Most comparable select libraries provide this capability out of the box.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions