Skip to content

Commit 992f10c

Browse files
committed
[ptmt#47] Stop infinite layouts on slow resizing
1 parent d019b15 commit 992f10c

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Examples/UIExplorer/UIExplorerApp.osx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ var styles = StyleSheet.create({
9090
backgroundColor: '#333'
9191
},
9292
rightPanel: {
93-
width: 450,
93+
flex: 1,
9494
},
9595
welcomeWrapper: {
9696
flex: 1,

React/Modules/RCTUIManager.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,11 @@ - (RCTViewManagerUIBlock)uiBlockWithLayoutUpdateForRootView:(RCTShadowView *)roo
619619

620620
// Update without animation
621621
} else {
622-
[view reactSetFrame:frame];
623-
622+
// Workaround for https://github.com/ptmt/react-native-desktop/issues/47
623+
// Need to speedup layout or make cancelling mechanism
624+
if (!view.isReactRootView) {
625+
[view reactSetFrame:frame];
626+
}
624627
RCTViewManagerUIBlock updateBlock = updateBlocks[reactTag];
625628
if (updateBlock) {
626629
updateBlock(self, _viewRegistry);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-desktop",
3-
"version": "0.5.0-rc3",
3+
"version": "0.5.1",
44
"description": "A framework for building native desktop apps using React",
55
"license": "BSD-3-Clause",
66
"repository": {

0 commit comments

Comments
 (0)