diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index a56488fd92b..f9d0e97c961 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -17,6 +17,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released ### Fixed - Fixed a benign error message which briefly appeared after logging in. [#6810](https://github.com/scalableminds/webknossos/pull/6810) +- Fixed saving allowed teams in dataset settings [#6817](https://github.com/scalableminds/webknossos/pull/6817) ### Removed diff --git a/frontend/javascripts/components/pricing_enforcers.tsx b/frontend/javascripts/components/pricing_enforcers.tsx index c4edcc454e3..b08d6b4dc85 100644 --- a/frontend/javascripts/components/pricing_enforcers.tsx +++ b/frontend/javascripts/components/pricing_enforcers.tsx @@ -78,11 +78,26 @@ export const PricingEnforcedButton: React.FunctionComponent = ({ children, requiredPricingPlan, + ...restProps }) => { const activeOrganization = useSelector((state: OxalisState) => state.activeOrganization); const isFeatureAllowed = isFeatureAllowedByPricingPlan(activeOrganization, requiredPricingPlan); - if (isFeatureAllowed) return <>{children}; + if (isFeatureAllowed) + // Spread additional props to the children (required since antd's form implementation + // typically fills value and onChange props on children of FormItems). + return ( + <> + {React.Children.map(children, (child) => { + if (!React.isValidElement(child)) { + return child; + } + return React.cloneElement(child, { + ...restProps, + }); + })} + + ); return (