Skip to content

Commit a2eaa5d

Browse files
authored
fix: clear read count when burn after read is checked (#118)
When the burn after read checkbox is checked, the read count input is now cleared to undefined. This matches the existing inverse behavior where setting a read count unchecks burn after read, since these options are mutually exclusive. Closes #103 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
1 parent 0569f18 commit a2eaa5d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/web/src/pages/Create.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,12 @@ export function CreatePage() {
780780
<Checkbox
781781
{...rest}
782782
checked={value}
783-
onCheckedChange={onChange}
783+
onCheckedChange={(checked) => {
784+
onChange(checked);
785+
if (checked) {
786+
form.setValue('rc', undefined);
787+
}
788+
}}
784789
disabled={createMutation.isPending || rest.disabled}
785790
/>
786791
</FormControl>

0 commit comments

Comments
 (0)