mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: infinite rendering due to wrong effect deps (#2895)
This commit is contained in:
parent
854810ec49
commit
1b534c0a3b
@ -90,7 +90,7 @@ export const FeatureStrategyEdit = () => {
|
||||
useEffect(() => {
|
||||
// Fill in the selected segments once they've been fetched.
|
||||
savedStrategySegments && setSegments(savedStrategySegments);
|
||||
}, [savedStrategySegments]);
|
||||
}, [JSON.stringify(savedStrategySegments)]);
|
||||
|
||||
const onStrategyEdit = async (payload: IFeatureStrategyPayload) => {
|
||||
await updateStrategyOnFeature(
|
||||
|
@ -4,7 +4,7 @@ import { Visibility, VisibilityOff } from '@mui/icons-material';
|
||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
|
||||
const StyledVisibilityToggle = styled(IconButton, {
|
||||
shouldForwardProp: prop => prop !== 'highlighted',
|
||||
shouldForwardProp: prop => prop !== 'visibilityOff',
|
||||
})<{ visibilityOff: boolean }>(({ theme, visibilityOff }) => ({
|
||||
marginLeft: 'auto',
|
||||
marginRight: theme.spacing(-1),
|
||||
|
Loading…
Reference in New Issue
Block a user