mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Update RangeWidget and RadioWidget examples from #5158
@pmario we avoid using the details element because it doesn't remember its state across refreshes. It's not something that we should encourage people to use if they don't understand the limitations. I also simplified the radio widget example because putting all the options on one line with a vertical bar separator is not a common way to display radio buttons.
This commit is contained in:
parent
5ad1193eb6
commit
6e93770459
@ -1,5 +1,5 @@
|
|||||||
created: 20201130181015815
|
created: 20201130181015815
|
||||||
modified: 20201130183426619
|
modified: 20210307102027763
|
||||||
tags: RadioWidget
|
tags: RadioWidget
|
||||||
title: RadioWidget Example
|
title: RadioWidget Example
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@ -14,19 +14,22 @@ type: text/vnd.tiddlywiki
|
|||||||
|
|
||||||
!! Using Actions
|
!! Using Actions
|
||||||
|
|
||||||
If you select an option, the value is written to $:/temp/test/value and the ''id'' field of tiddler: $:/temp/test will be updated.
|
When you select an option below the following acitons will occur:
|
||||||
|
|
||||||
A notification showing the ''actionValue'' will be shown.
|
* the value is written to $:/temp/test/value
|
||||||
|
* the ''id'' field of tiddler: $:/temp/test will be updated
|
||||||
|
* a notification showing the ''actionValue'' will be shown
|
||||||
|
|
||||||
<$tiddler tiddler="$:/temp/test">
|
<$tiddler tiddler="$:/temp/test">
|
||||||
<$radio field="id" value="a" actions=<<radioActions>> > Option a </$radio>|
|
|
||||||
<$radio field="id" value="b" actions=<<radioActions>> > Option b </$radio>|
|
<$radio field="id" value="a" actions=<<radioActions>> > Option a </$radio>
|
||||||
<$radio field="id" value="c" actions=<<radioActions>> > Option c </$radio>|
|
|
||||||
|
<$radio field="id" value="b" actions=<<radioActions>> > Option b </$radio>
|
||||||
|
|
||||||
|
<$radio field="id" value="c" actions=<<radioActions>> > Option c </$radio>
|
||||||
|
|
||||||
</$tiddler>
|
</$tiddler>
|
||||||
|
|
||||||
---
|
The wikitext of this example is shown below:
|
||||||
|
|
||||||
<details>
|
<$codeblock code={{RadioWidget Example!!text}}/>
|
||||||
<summary>Show the code [[RadioWidget Example]]</summary>
|
|
||||||
<pre><code><$view mode=text&><pre><code>
|
|
||||||
</details>
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
created: 20201130191618831
|
created: 20201130191618831
|
||||||
modified: 20201130194441670
|
modified: 20210307102027763
|
||||||
tags: RangeWidget
|
tags: RangeWidget
|
||||||
title: RangeWidget Example
|
title: RangeWidget Example
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
@ -48,7 +48,6 @@ type: text/vnd.tiddlywiki
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<details>
|
The wikitext of this example is shown below:
|
||||||
<summary>Show the code [[RangeWidget Example]]</summary>
|
|
||||||
<pre><code><$view mode=text&><pre><code>
|
<$codeblock code={{RangeWidget Example!!text}}/>
|
||||||
</details>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user