mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-16 14:54:51 +00:00
Clarify select widget docs
This commit is contained in:
parent
9e6dab06cc
commit
3ad4febc15
@ -10,20 +10,24 @@ The select widget displays an [[HTML select element|https://developer.mozilla.or
|
|||||||
|
|
||||||
For example, this select widget displays a list of the tags in this wiki:
|
For example, this select widget displays a list of the tags in this wiki:
|
||||||
|
|
||||||
<$macrocall $name="wikitext-example-without-html" src="<$select tiddler=<<qualify 'select-demo'>> default='widget'>
|
<$macrocall $name="wikitext-example-without-html" src="<$select tiddler=<<qualify 'select-demo'>> default='HelloThere'>
|
||||||
<$list filter='[all[shadows+tiddlers]tags[]sort[title]]'>
|
<$list filter='[all[shadows+tiddlers]tags[]sort[title]]'>
|
||||||
<option value=<<currentTiddler>>><$view field='title'/></option>
|
<option value=<<currentTiddler>>><$view field='title'/></option>
|
||||||
</$list>
|
</$list>
|
||||||
</$select>"/>
|
</$select>"/>
|
||||||
|
|
||||||
The <$link to=<<qualify "select-demo">>>state tiddler</$link> currently contains <$edit-text tiddler=<<qualify "select-demo">> tag="input" default=""/>. See the text change as you switch entries in the select widget. Try changing the value of the state tiddler and see the select widget change. Notice how the select widget only displays an entry if there is a precise match with the tiddler text.
|
The <$link to=<<qualify "select-demo">>>state tiddler</$link> currently contains:
|
||||||
|
|
||||||
|
<$edit-text tiddler=<<qualify "select-demo">> tag="input" default=""/>
|
||||||
|
|
||||||
|
See the text change as you switch entries in the select widget. Try changing the value of the state tiddler and see the select widget change. Notice how the select widget only displays an entry if there is a precise match with the tiddler text.
|
||||||
|
|
||||||
! Content and Attributes
|
! Content and Attributes
|
||||||
|
|
||||||
The content of the `<$select>` widget should be one or more HTML `<option>` or `<optiongroup>` elements that provide the available values.
|
The content of the `<$select>` widget should be one or more HTML `<option>` or `<optiongroup>` elements that provide the available values.
|
||||||
|
|
||||||
|!Attribute |!Description |
|
|!Attribute |!Description |
|
||||||
|tiddler |The title of the tiddler containing the value (defaults to the current tiddler) |
|
|tiddler |The title of the tiddler containing the value to be displayed in the select widget (defaults to the current tiddler) |
|
||||||
|field |The field name for the value in the current tiddler (defaults to "text") |
|
|field |The field name for the value in the current tiddler (defaults to "text") |
|
||||||
|index |The index of a property in a [[DataTiddler|DataTiddlers]] (takes precedence over the field attribute) |
|
|index |The index of a property in a [[DataTiddler|DataTiddlers]] (takes precedence over the field attribute) |
|
||||||
|class |CSS classes to be assigned to the HTML select element |
|
|class |CSS classes to be assigned to the HTML select element |
|
||||||
|
Loading…
Reference in New Issue
Block a user