From e3837f6ad5447cec693869b8dd8067793784efa9 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 26 May 2024 12:45:53 -0400 Subject: [PATCH] feat: Adds permission selector in document/collection invite flow (#6948) * stash * fix: Permissions cleared on collection addition fix: Cannot remove user from document Allow choosing permission in invite flow --- .../InputMemberPermissionSelect.tsx | 8 +-- app/components/InputSelect.tsx | 2 +- app/components/InputSelectPermission.tsx | 8 +-- .../Sharing/Collection/SharePopover.tsx | 64 ++++++++++++++++--- .../Document/DocumentMemberListItem.tsx | 1 + .../Sharing/Document/SharePopover.tsx | 57 ++++++++++++++--- app/components/WebsocketProvider.tsx | 10 +-- 7 files changed, 111 insertions(+), 39 deletions(-) diff --git a/app/components/InputMemberPermissionSelect.tsx b/app/components/InputMemberPermissionSelect.tsx index d5c40f0b0..510867110 100644 --- a/app/components/InputMemberPermissionSelect.tsx +++ b/app/components/InputMemberPermissionSelect.tsx @@ -10,19 +10,13 @@ export default function InputMemberPermissionSelect( ) { const { value, onChange, ...rest } = props; const { t } = useTranslation(); - const handleChange = React.useCallback( - (value) => { - onChange?.(value === EmptySelectValue ? null : value); - }, - [onChange] - ); return (