File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export function Todos({ todos }: { todos: Todo[] }) {
86
86
todos . map ( ( todo ) => (
87
87
< li
88
88
key = { todo . id }
89
- className = "flex items-center gap-2 w-full hover:bg-muted/50 active:bg-muted rounded-sm p-1"
89
+ className = "h-10 flex items-center gap-2 w-full hover:bg-muted/50 active:bg-muted rounded-sm p-1"
90
90
>
91
91
< Checkbox
92
92
checked = {
@@ -96,7 +96,9 @@ export function Todos({ todos }: { todos: Todo[] }) {
96
96
}
97
97
onCheckedChange = { ( ) => handleToggle ( todo . id ) }
98
98
id = { `checkbox-${ todo . id } ` }
99
- disabled = { deleted . findIndex ( ( t ) => t === todo . id ) > - 1 }
99
+ disabled = {
100
+ deleted . findIndex ( ( t ) => t === todo . id ) > - 1 || loading
101
+ }
100
102
/>
101
103
< label
102
104
htmlFor = { `checkbox-${ todo . id } ` }
@@ -116,6 +118,7 @@ export function Todos({ todos }: { todos: Todo[] }) {
116
118
size = "sm"
117
119
variant = "destructive"
118
120
className = "p-3"
121
+ disabled = { loading }
119
122
onClick = { ( ) => markForDeletion ( todo . id ) }
120
123
>
121
124
< Trash size = { 16 } />
You can’t perform that action at this time.
0 commit comments