shadcn-vue icon indicating copy to clipboard operation
shadcn-vue copied to clipboard

[Feature]: use virtual list for command (or components when use list for render lots of items)

Open davsaniuv opened this issue 1 year ago • 5 comments
trafficstars

Describe the feature

Im trying to use filters on task example but when i put a lot of items on some filters it crashes and it runs slow, i’ve tried to use virtual list on radix ui and it works better but i dont how to know to style it as good as shadcn styles so i wonder if is there are plans to bring this component (s)

Additional information

  • [ ] I intend to submit a PR for this feature.
  • [ ] I have already implemented and/or tested this feature.

davsaniuv avatar Jun 23 '24 01:06 davsaniuv

@davsaniuv hello! I was previously worked on this example feature, but don't have much time to end this for a reasonable PR. I just updated my working branch with dev, here you can find some example how to implement this feature with vue-virtual-scroller

https://github.com/radix-vue/shadcn-vue/assets/82209198/2006be2d-424b-4783-8c04-e0e350944a06

This example is inside /src/examples/big-data/Example.vue, if you have some additional questions feel free to ask 🙌 image

Branch where you can find all code: link

hrynevychroman avatar Jun 24 '24 19:06 hrynevychroman

that's awesome, but is there a way to implement this with command and filters ? this one: CleanShot 2024-06-25 at 07 19 22

at this moment have filters with 100+ options

wrtisans avatar Jun 25 '24 13:06 wrtisans

Yeah, definitely, will send you some working example 🙌

hrynevychroman avatar Jul 02 '24 10:07 hrynevychroman

@wrtisans, here is the raw example of how you can virtualize this popover 🙂

https://github.com/radix-vue/shadcn-vue/assets/82209198/6585bbdf-d549-440b-a134-9ab7fe26795a

Branch: https://github.com/romanhrynevych/shadcn-vue/commit/a1fcbf8ea9e147c86ebab55db3a128e0e28d854c

hrynevychroman avatar Jul 10 '24 18:07 hrynevychroman

thats awesome, thanks a lot!!

davsaniuv avatar Jul 12 '24 15:07 davsaniuv

Thanks for the link @hrynevychroman ! Closing this as the support for virtual list should be added by dev in their own project 😁

zernonia avatar Feb 23 '25 16:02 zernonia