Skip to content
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

Add grouping support like select's <optgroup> tag #1713

Closed
pimepan opened this issue Nov 21, 2022 · 1 comment
Closed

Add grouping support like select's <optgroup> tag #1713

pimepan opened this issue Nov 21, 2022 · 1 comment

Comments

@pimepan
Copy link

pimepan commented Nov 21, 2022

We are using extensively the component for an admin dashboard we built from the ground up but now our users need to be able to visualize inside the selected data, divided by groups and we havent found a way to doit with the component as it is.

we would like to have a funcitonal prop (like reduce), maybe called "groupedBy" that recieves an Array of objects with the name of the group and a filtering function to append the data to that group. Something like:

<vSelect :group-by='[
   {
      label:'Group X',
      cond:(item)=> item === 'abc'
    },
  {
      label:'Group y',
      cond:(item)=> item === 'cba'
    }

]'/>

I am open to alternatives arounde this problem too! anything that can enable this feature would be nice

@sagalbot
Copy link
Owner

One of the longest standing feature requests for sure. I like the look of that API.

I'm working on making this happen in v4, and it'll use a 'composition' approach with components, but I'll probably be able to add support for this api as well.

Closing this, since we've got #342 (over a thousand issues ago!) which will feel great to finally close.

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

No branches or pull requests

2 participants