diff options
author | Joris | 2023-02-19 13:23:19 +0100 |
---|---|---|
committer | Joris | 2023-02-19 13:25:52 +0100 |
commit | 46950ed9e9f513c37366347e8eb7cc5295591864 (patch) | |
tree | f496ad6ee322906b6ccd4b5148519646b40dab4b /src/example.ts | |
parent | 0267049f29374f0114bef23a5982c930c4d2bedb (diff) |
Fix setting an attribute to false
Diffstat (limited to 'src/example.ts')
-rw-r--r-- | src/example.ts | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/example.ts b/src/example.ts index 229d3a0..0870f4e 100644 --- a/src/example.ts +++ b/src/example.ts @@ -185,9 +185,23 @@ const seq = ) ) +const indirectCheckbox = + withState(false, checked => [ + checkboxComponent({ + label: 'C1', + isChecked: checked, + onCheck: (b: boolean) => checked.update(_ => b) + }), + checkboxComponent({ + label: 'C2', + isChecked: checked, + onCheck: (b: boolean) => checked.update(_ => b) + }) + ]) + const view = h('main', h('h1', 'Rx'), - chrono + indirectCheckbox ) mount(view) |