diff --git a/src/components/Fields/CheckBox.tsx b/src/components/Fields/CheckBox.tsx index 5e0716c7..85f8cdba 100644 --- a/src/components/Fields/CheckBox.tsx +++ b/src/components/Fields/CheckBox.tsx @@ -5,6 +5,7 @@ const CheckBox = (props: any) => { const { value, row, onSubmit } = props; return ( { onSubmit(row.ref, !value); diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index c78e25c7..98b6bd97 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -51,7 +51,7 @@ const onSubmit = (fieldName: string) => ( ref: firebase.firestore.DocumentReference, value: any ) => { - if (!!value) { + if (value !== null || value !== undefined) { ref.update({ [fieldName]: value }); } };