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:
And while filtering with the groups:
Shortcomings and thoughts about how I currently have it:
I think that having to nest the v-for loops feels kind of bad and potentially has performance improvements if we made a computed value that split the filteredItems into groups so it could potentially be a faster render.
Currently the group labels always display. Even if there are no filtered items within it. I think the computed route could potentially solve this in an easier way. See:
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.
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:
And while filtering with the groups:
Shortcomings and thoughts about how I currently have it:
v-for
loops feels kind of bad and potentially has performance improvements if we made a computed value that split thefilteredItems
into groups so it could potentially be a faster render.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.