diff --git a/app/components/Collection/CollectionForm.tsx b/app/components/Collection/CollectionForm.tsx index b567e36ed..72af44c1b 100644 --- a/app/components/Collection/CollectionForm.tsx +++ b/app/components/Collection/CollectionForm.tsx @@ -18,6 +18,7 @@ import Switch from "~/components/Switch"; import Text from "~/components/Text"; import useBoolean from "~/hooks/useBoolean"; import useCurrentTeam from "~/hooks/useCurrentTeam"; +import { EmptySelectValue } from "~/types"; import { Feature, FeatureFlags } from "~/utils/FeatureFlags"; const IconPicker = React.lazy(() => import("~/components/IconPicker")); @@ -142,8 +143,10 @@ export const CollectionForm = observer(function CollectionForm_({ { - field.onChange(value); + onChange={( + value: CollectionPermission | typeof EmptySelectValue + ) => { + field.onChange(value === EmptySelectValue ? null : value); }} note={t( "The default access for workspace members, you can share with more users or groups later."