Skip to content

Conversation

urbanambroz
Copy link

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ 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

Added virtulization for single group in SelectMenu that goes around the limitation of RekaUI which makes ComboBoxGroup virtualization impossible right now.

πŸ“ Checklist

This is solving the issue described here.

I have updated the SelectMenu props and added JSDoc comments to it, didn't go into adjusting the docs.

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

Copy link

pkg-pr-new bot commented Jul 23, 2025

npm i https://pkg.pr.new/@nuxt/ui@4572

commit: 2acb0e6

@fabiiomiiguel
Copy link

fabiiomiiguel commented Aug 4, 2025

Will this be merged? It would be really useful πŸ™‚

PS: Any new @benjamincanac? It looks a nice short-term solution until the Reka UI team provides the proper fix.

@benjamincanac benjamincanac added the v3 #1289 label Aug 27, 2025
@tiloburgey
Copy link

Does this get reviewed soon? It's already a dealbreaker for ppl choosing nuxtui over competing component libs that have a virtulized feature especially for input elements that have 100+ options.

@benjamincanac benjamincanac changed the title added support for item virtualization in SelectMenu for a single group feat(SelectMenu): handle virtualizer Sep 13, 2025
Copy link
Member

@benjamincanac benjamincanac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review! I've been quite busy with v4 😬

It would be nice to also apply these changes to the InputMenu component once we have a version working 😊

@@ -52,6 +52,7 @@ const components = [
'radio-group',
'select',
'select-menu',
'select-menu-virtualized',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be done inside the select-menu page?

* When `true` the items in the SelectMenu are virtualized. Keep in mind that this only works with a single group due to a limitation of RekaUI (https://github.com/unovue/reka-ui/issues/1885).
* @defaultValue false
*/
virtualize?: boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather have a single virtualize prop with boolean | ComboboxVirtualizerProps.

:options="filteredGroups[0]!.map(item => item as AcceptableValue)"
:estimate-size="virtualItemEstimateSize"
>
<ComboboxItem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to move the whole <ComboboxItem> inside a <DefineItemTemplate> to avoid repetition.

</ComboboxItem>
</ComboboxVirtualizer>

<ComboboxGroup v-for="(group, groupIndex) in filteredGroups" v-else :key="`group-${groupIndex}`" :class="ui.group({ class: props.ui?.group })">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The v-else here should be on a <template> that wraps the <ComboboxGroup v-for="....

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

Successfully merging this pull request may close these issues.

4 participants