Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "fix bug where not specifying height on TextInput causes 0 height",
"packageName": "react-native-windows",
"email": "kmelmon@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-04-15T05:41:41.940Z"
}
1 change: 0 additions & 1 deletion packages/playground/Samples/textinput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ const styles = StyleSheet.create({
},
input: {
margin: 5,
height: 40,
width: 700,
borderColor: '#7a42f4',
borderWidth: 1,
Expand Down
1 change: 1 addition & 0 deletions vnext/ReactUWP/Modules/NativeUIManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ void NativeUIManager::ReplaceView(facebook::react::ShadowNode &shadowNode) {
auto context = std::make_unique<YogaContext>(node.GetView());
YGNodeSetContext(yogaNode, reinterpret_cast<void *>(context.get()));

m_tagsToYogaContext.erase(node.m_tag);
m_tagsToYogaContext.emplace(node.m_tag, std::move(context));
}
} else {
Expand Down
6 changes: 6 additions & 0 deletions vnext/ReactUWP/Views/ShadowNodeBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ void ShadowNodeBase::ReparentView(XamlView view) {
}
}
ReplaceView(view);

// Let the UIManager know about this so it can update the yoga context.
if (const auto instance = GetViewManager()->GetReactInstance().lock()) {
auto pNativeUiManager = static_cast<NativeUIManager *>(instance->NativeUIManager());
pNativeUiManager->ReplaceView(*static_cast<ShadowNode *>(this));
}
}

winrt::Windows::UI::Composition::CompositionPropertySet ShadowNodeBase::EnsureTransformPS() {
Expand Down
1 change: 1 addition & 0 deletions vnext/include/Include.vcxitems.filters
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<ClInclude Include="$(MSBuildThisFileDirectory)ReactUWP\Utils\UwpScriptStore.h">
<Filter>ReactUWP\Utils</Filter>
</ClInclude>
<ClInclude Include="$(MSBuildThisFileDirectory)ReactWindowsCore\cdebug.h" />
</ItemGroup>
<ItemGroup>
<Filter Include="ReactUWP">
Expand Down