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
This commit is contained in:
Tom Moor
2024-05-26 12:45:53 -04:00
committed by GitHub
parent 88eae87404
commit e3837f6ad5
7 changed files with 111 additions and 39 deletions

View File

@@ -17,12 +17,6 @@ function InputSelectPermission(
) {
const { value, onChange, ...rest } = props;
const { t } = useTranslation();
const handleChange = React.useCallback(
(value) => {
onChange?.(value === EmptySelectValue ? null : value);
},
[onChange]
);
return (
<InputSelect
@@ -44,7 +38,7 @@ function InputSelectPermission(
]}
ariaLabel={t("Default access")}
value={value || EmptySelectValue}
onChange={handleChange}
onChange={onChange}
{...rest}
/>
);