Skip to content
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

Provide a slot for QOptionGroup to customise the label content #8609

Closed
dsl101 opened this issue Mar 11, 2021 · 1 comment
Closed

Provide a slot for QOptionGroup to customise the label content #8609

dsl101 opened this issue Mar 11, 2021 · 1 comment

Comments

@dsl101
Copy link
Contributor

dsl101 commented Mar 11, 2021

Is your feature request related to a problem? Please describe.
I have some individual checkboxes using this kind of layout:

<q-checkbox v-model="model" label="Setting X">
  <q-item-label caption>Explanation of what setting X is for</q-item-label>
</q-checkbox>

I'd like to use QOptionGroup for some of those settings, but can't follow that style, as there is no 'sublabel' prop, nor a scope to customise the label element of that component.

Describe the solution you'd like
Something like:

<q-option-group v-model="model" :options="options">
  <template #label="prop">
    <q-item-label>{{prop.node.label}}</q-item-label>
    <q-item-label caption>{{prop.node.explanation}}</q-item-label>
  </template>
</q-option-group>

Describe alternatives you've considered
Individual QRadios with external code to handle the group / clearing / maintaining model, etc. but that's kind of what QOptionGroup is for I think.

@rstoenescu
Copy link
Member

Will be available in Quasar v2.2.0

pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 25, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 25, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 25, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 25, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 26, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 26, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 27, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 30, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 5, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 5, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 5, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 5, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 6, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 10, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 1, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 6, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 8, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 8, 2021
rstoenescu added a commit that referenced this issue Dec 8, 2021
…t from v2) (#11600)

* feat(QOptionGroup): New slots -> "label" and "label-N" #8609 (backport from v2)

* Update option-group.md

* Update QOptionGroup.json

Co-authored-by: Razvan Stoenescu <razvan.stoenescu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants