-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
How about optgroup? #342
Comments
@sagalbot - We would really like to use optgroup in vue-select. Would you be willing to accept a donation to add support for optgroup to this library? We could maybe spare say $250? |
Any updates on this? |
+1 for optgroups! |
1 similar comment
+1 for optgroups! |
+1 for optgroups |
2 similar comments
+1 for optgroups |
+1 for optgroups |
Hi! Here my soluction using Vue slots.<select @change="onChange($event, index)">
<option selected>seleccionar</option>
<slot v-for="(item, i) in topItems">
<optgroup :key="i" v-if="item.sections" :label="item.name">
<option v-for="(subItem, i) in item.sections.section" :key="i" :value="subItem.url">{{ sub.name }}</option>
</optgroup>
<option :key="i" v-if="!item.sections" :value="item.url"> {{ item.name }} </option>
</slot>
</select> |
+1 for optgroups |
+1 |
3 similar comments
+1 |
+1 |
+1 |
+1 Would be awesome |
+1 |
+1 please... |
+1 |
+1 for optgroup, please |
please, we all need optgroups |
very much needed optgroup |
please optgroup 😢 |
+1 |
+1 |
1 similar comment
+1 |
+1 |
11 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
` <script> function selectableOption( option ) { return option.heading != true; } </script>
` Here is a possible solution which looks similar as the optgroup.
|
+1 |
another "workaround" until implemented, however v-select and v-overflow-btn can take an item w/ property here's a lone site which hinted at the property (which I missed in the v-select docs) but also works for overflow (not mentioned in docs): https://ourcodeworld.com/articles/read/1561/whats-the-equivalent-to-optgroup-selects-in-vuetify |
Thank you! Works with Vue3. So for everyone who doesn't understand, you have to add the headings flat within your options (no grouping inside your options array), so its like this:
|
@warmfire540 thank you so much for this, you saved my bacon today! I'd like to share it with you as my token of gratitude 🥓 |
No description provided.
The text was updated successfully, but these errors were encountered: