Feature: sublabels / option slots
See original GitHub issueI would like to customize the options adding a new gray sublabel, like count but with my own text. The best solution would probably be a slot that allows the users of this component to change the labels with our own custom HTML:
<treeselect ...>
<template slot="option" slot-scope="option">
{{option.label}}
...other things i want to customize the label with here...
</template>
</treeselect>
You can provide a default slot implementation as a fallback, so it’s a completely backwards compatible change and only adds new functionality.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Provide a slot for QOptionGroup to customise the label content
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...
Read more >show security monitoring performance spu | Junos OS
Display the services processing unit (SPU) percent utilization for all FPC slots over the last 60 seconds. Use this command to track the...
Read more >Voice Extensible Markup Language (VoiceXML) Version 2.0
A menu presents the user with a choice of options and then transitions to another dialog based on that choice. A subdialog is...
Read more >IT – Applications Training and Support - SharpSchool
Creating Sublabels (Similar to Subfolders) . ... Calendar Appointment Slots – Sending Sign-Up Link to Staff .
Read more >How to use the langcodes.tag_parser.LanguageTagError ...
To help you get started, we've selected a few langcodes.tag_parser.LanguageTagError examples, based on popular ways it is used in public projects.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, I just added the slot. It would be like this to use it:
Note that,
slot-scope="{ option }"
used destructuring. Theoption
variable provides a lot of properties (e.g.isBranch
,isLeaf
,ancestors
,level
, …etc) for your template to consume. You can also useoption.raw
to access the original option data you passed to the component.Another thing worth noting is that, since the count text is implemented in the fallback content, if you customized the slot then you have to implement the count text yourself too if you are using it.
Do you think the API design fits your needs? Any suggestions are welcome!
Hi, really sorry it took too long to have this feature finished. Just to let you know I just shipped it in v0.0.7.