mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 00:50:28 +00:00
Another select widget demo
This commit is contained in:
parent
78791192c3
commit
fc6d96672d
@ -78,3 +78,17 @@ The ListWidget can be used to generate the options for a select widget. For exam
|
||||
<$tiddler tiddler={{$:/generated-list-demo-state}}>
|
||||
<$transclude mode='block'/>
|
||||
</$tiddler>"/>
|
||||
|
||||
!! Nested Lists
|
||||
|
||||
This example uses a nested pair of list widgets. The outer one generates the `<optgroup>` elements, and the inner one generates `<option>` elements:
|
||||
|
||||
<$macrocall $name="wikitext-example-without-html" src="<$select tiddler='$:/generated-list-demo-nestedstate' field='type' default='text/vnd.tiddlywiki'>
|
||||
<$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group]]'>
|
||||
<optgroup label={{!!group}}>
|
||||
<$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]]'>
|
||||
<option value={{!!name}}><$view field='description'><$view field='title'/></$view> (<$view field='name'/>)</option>
|
||||
</$list>
|
||||
</optgroup>
|
||||
</$list>
|
||||
</$select>"/>
|
||||
|
Loading…
Reference in New Issue
Block a user