Skip to content

Commit 7492ecf

Browse files
committed
Fix: force value passed to checked prop to be boolean
Cast field.value passed to checked prop in boolean, to avoid checked prop to be <empty string> in BooleanInput
1 parent d074f20 commit 7492ecf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/ra-ui-materialui/src/input/BooleanInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const BooleanInput = (props: BooleanInputProps) => {
7979
color="primary"
8080
onChange={handleChange}
8181
onFocus={onFocus}
82-
checked={field.value}
82+
checked={Boolean(field.value)}
8383
{...sanitizeInputRestProps(rest)}
8484
{...options}
8585
disabled={disabled}

0 commit comments

Comments
 (0)