antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
544 stars 39 forks source link

[w-autocomplete] Groups #144

Open DerrikMilligan opened 5 months ago

DerrikMilligan commented 5 months ago

One things that could be an interesting and useful feature for the autocomplete is the idea of grouping like elements together. Similar to how an <optgroup> functions inside a <select> grouping together similar <option>s.

@antoniandre I'm sure you'll have some ideas for how this could be done better or more in your style. I was just getting some thoughts out there and maybe some groundwork.

This is how this ends up looking:

image

And while filtering with the groups:

image

Shortcomings and thoughts about how I currently have it:

I know that the w-autocomplete is a WIP and so is this PR. Let me know what you think and we can tweak stuff.

antoniandre commented 4 months ago

Good idea and result! I'll test locally and see if I find a tweak before publishing.