Q-select with nested or grouped data and filtering?
-
I’ve used the select2.js plugin on other projects but I would love to maintain my use of the Quasar framework on this particular project.
I need to have a q-select field, but with option groups to allow the data to be nested. Only the child items should be selectable (as per native optgroups) and preferably it should all be filterable.
Is this possible with a q-select? I couldn’t see any way of using nested data or native optgroups?
-
If anyone’s interested, I tried both vue-multiselect and vue-treeselect, but none of them gave me the exact functionality of grouping, with unselectable parent items and filtering on all items shown. So I mocked up what I needed using a q-select and q-items: https://codepen.io/jammy-git/pen/KKdarbP?editors=1011
-
Thanks for sharing your solution. There is another example solution under a similar git issue: https://github.com/quasarframework/quasar/issues/5724#issuecomment-570695565