Separators / sections for q-select and q-dialog-select
-
Is it possible? I have both kinds (referencing the same model), and would love to be able to separate the dozen or so options (
type="checkbox"
) into 3 groups with a label above each. Is that possible?If not, maybe it could be done by binding something like this to
:options
:selectOptions: { 'Section 1': [ { label: 'Google', value: 'goog' }, { label: 'Facebook', value: 'fb' } ], 'Section 2': [ { label: 'Something else' value: 'other' } ] }
i.e. if options is an object rather than an array, assume the object keys are the sections labels and the contents of each item are the options for that section…
-
Unfortunately with QSelect, there isn’t (yet) a method to add sections.
If you’d like, you could start an issue for the suggestion: https://github.com/quasarframework/quasar/issues/new
Scott
-
Many thanks - I’ve posted a feature request: https://github.com/quasarframework/quasar/issues/557
-
Saw it. Will do. Thanks for filing the Github ticket!
-
Is there an example of how to do this with V1 scoped slots?
-