-
Notifications
You must be signed in to change notification settings - Fork 860
feat(SelectMenu): handle virtualizer #4572
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
base: v3
Are you sure you want to change the base?
Conversation
commit: |
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. |
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. |
There was a problem hiding this 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', |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 })"> |
There was a problem hiding this comment.
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="...
.
π Linked issue
β Type of 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.