Skip to content

Commit

Permalink
fix: handle setting display for _viewConfig attribute (software-m…
Browse files Browse the repository at this point in the history
…ansion#2071)

## Description

PR fixing the app freezes due to `react-freeze` 😄
  • Loading branch information
WoLewicki authored and ja1ns committed Oct 9, 2024
1 parent da4df73 commit 6822b4c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/Screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ interface ViewConfig extends View {
};
};
};
_viewConfig: {
validAttributes: {
style: {
display: boolean;
};
};
};
}

export class InnerScreen extends React.Component<ScreenProps> {
Expand Down Expand Up @@ -119,6 +126,12 @@ export class InnerScreen extends React.Component<ScreenProps> {
display: false,
};
this.setRef(ref);
} else if (ref?._viewConfig?.validAttributes?.style) {
ref._viewConfig.validAttributes.style = {
...ref._viewConfig.validAttributes.style,
display: false,
};
this.setRef(ref);
}
};

Expand Down

0 comments on commit 6822b4c

Please sign in to comment.