Skip to content

feat(combobox): add usePortal prop to ComboboxList.vue #1337

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

kaspernowak
Copy link

πŸ”— Linked issue

#1336

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR adds a usePortal prop to ComboboxList.vue in the New York V4 registry.

Why:
Currently, ComboboxList always wraps the dropdown content in a ComboboxPortal, preventing parent components from controlling whether the dropdown is rendered inline or teleported. This causes major usability issues on mobile devices, where teleporting the dropdown often results in poor UX due to the on-screen keyboard and viewport constraints.

What:

  • Adds a usePortal prop (default: true) to ComboboxList.vue.
  • When usePortal is false, the dropdown content is rendered inline, solving the mobile usability problem.
  • When usePortal is true, the previous teleport behavior is preserved.
  • No breaking changes; default behavior is unchanged.

I would like to note, that the changes made to the stepper component json files, came from running pnpm build:registry on a fresh clone of the dev branch.
Also, I have not updated the documentation, as I found that it is currently in a weird place as I mentioned in #1316, and needs to be refactor before I would dare contributing to it.

Resolves #1336

πŸ“Έ Screenshots (if appropriate)

N/A

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Allow parent control over portal/teleport behavior in ComboboxList for improved mobile usability
1 participant