Skip to content

Commit

Permalink
[UWP Renderer] Add a null check to inline action rendering (#8228)
Browse files Browse the repository at this point in the history
* Update custom.props for object model release

* Updated Xcode version (#8222)

* removed build step as they are redundant (#8201)

* removed build step as they are redundant

* added pod installation step

* Add a null check for inline Actions

Co-authored-by: Joseph Woo <Joseph.Woo@microsoft.com>
  • Loading branch information
anna-dingler and jwoo-msft authored Jan 13, 2023
1 parent 0593d95 commit 90b97be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/uwp/Renderer/lib/AdaptiveTextInputRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ namespace winrt::AdaptiveCards::Rendering::Uwp::implementation
bool isMultiline = adaptiveTextInput.IsMultiline();
winrt::TextInputStyle style = adaptiveTextInput.TextInputStyle();
isMultiline &= style != winrt::TextInputStyle::Password;
textBoxParentContainer = render_xaml::ActionHelpers::HandleInlineAction(
auto textBoxWithInlineAction = render_xaml::ActionHelpers::HandleInlineAction(
renderContext, renderArgs, inputUIElement, textBoxParentContainer, isMultiline, inlineAction);

// If the inlineAction is ShowCard, textBoxWithInlineAction will be null and we should not update the parent container
if (textBoxWithInlineAction)
{
textBoxParentContainer = textBoxWithInlineAction;
}
}

if (!adaptiveTextInput.IsMultiline())
Expand Down

0 comments on commit 90b97be

Please sign in to comment.