Skip to content

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

Closed
kaspernowak wants to merge 1 commit into
unovue:devfrom
kaspernowak:feat/comboboxlist-use-portal
Closed

feat(combobox): add usePortal prop to ComboboxList.vue#1337
kaspernowak wants to merge 1 commit into
unovue:devfrom
kaspernowak:feat/comboboxlist-use-portal

Conversation

@kaspernowak
Copy link
Copy Markdown

🔗 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.

@sadeghbarati
Copy link
Copy Markdown
Collaborator

Sorry for late late response, and thanks for the PR

If this feature does not exist in shadcn/ui, it won't be considered here

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

2 participants