File tree 3 files changed +10
-8
lines changed
fields/inputFields/fields/Editor
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 40
40
<textarea bind:value ={value } onfocusout ={() => focusOut ()} oninput ={() => props .onValueChange (value )}
41
41
></textarea >
42
42
{:else }
43
- <MarkdownRenderComponent bind: value ={value } plugin ={props .plugin } filePath ={props .filePath }
43
+ <MarkdownRenderComponent value ={value } plugin ={props .plugin } filePath ={props .filePath }
44
44
></MarkdownRenderComponent >
45
45
{/if }
46
46
</div >
Original file line number Diff line number Diff line change 5
5
let element: HTMLElement ;
6
6
7
7
const {
8
- value = $bindable ( ' ' ) ,
8
+ value,
9
9
plugin,
10
10
filePath,
11
11
}: {
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
let {
3
- checked = $bindable (false ),
3
+ checked = $bindable (),
4
4
}: {
5
5
checked? : boolean ;
6
6
} = $props ();
7
+
8
+ let boolChecked = $derived (checked ?? false );
7
9
</script >
8
10
9
11
<div
10
12
class =" checkbox-container"
11
- class:is-enabled ={checked }
13
+ class:is-enabled ={boolChecked }
12
14
role =" switch"
13
15
tabindex =" 0"
14
- aria-checked ={checked }
15
- onclick ={() => (checked = ! checked )}
16
+ aria-checked ={boolChecked }
17
+ onclick ={() => (checked = ! boolChecked )}
16
18
onkeydown ={e => {
17
19
if (e .key === ' ' ) {
18
- checked = ! checked ;
20
+ checked = ! boolChecked ;
19
21
}
20
22
}}
21
23
>
22
- <input type ="checkbox" tabindex ="-1" checked ={checked } />
24
+ <input type ="checkbox" tabindex ="-1" checked ={boolChecked } />
23
25
</div >
You can’t perform that action at this time.
0 commit comments