Skip to content

[Bug]: AutoCompleteInput dropdown overflows viewport #6483

Description

@rahulmistry751

Problem Description

When using AutoCompleteInput near the bottom or right boundaries of the screen viewport:

  1. The suggestion dropdown menu gets clipped or rendered out of viewport bounds because it only calculates coordinates below the input line.
  2. Value previews for non-string dynamic data types (e.g. Objects, Arrays, Booleans, Nulls) are not consistently formatted or truncated in the preview pane.

Expected Behavior

  • The dropdown menu should dynamically inspect remaining vertical and horizontal space relative to the cursor / viewport bounds.
  • If vertical space below the input is insufficient, the dropdown should flip above the cursor line while remaining clamped within viewport padding.
  • Value previews should cleanly format arrays, objects, strings, numbers, booleans, and null values with type indicators.

Steps to Reproduce

  1. Add a component - Discord
  2. Observe the dropdown overflowing past the bottom of the viewport or clipping the value preview pane while adding value in since text field

Proposed Solution

  • Update calculateDropdownPosition in dropdownPosition.ts to support viewport height calculation, boundary clamping, and flip-above positioning.
  • Enhance AutoCompleteInput.tsx value preview rendering across all data types.

Additional Context

  • Affected files: web_src/src/components/AutoCompleteInput/AutoCompleteInput.tsx, dropdownPosition.ts

Attachments

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions