Skip to content
Closed
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
Expand Up @@ -50,7 +50,10 @@ folly::dynamic RenderOutput::renderView(
folly::dynamic props = folly::dynamic::object;
#endif

if (std::string_view(view.componentName) == "Paragraph") {
// SelectableParagraph shares ParagraphState with Paragraph; render its text
// the same way so selectable text stays observable in test output.
if (std::string_view(view.componentName) == "Paragraph" ||
std::string_view(view.componentName) == "SelectableParagraph") {
const auto& state =
static_cast<const ConcreteState<ParagraphState>&>(*view.state);
element["children"] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <react/renderer/components/scrollview/ScrollViewComponentDescriptor.h>
#include <react/renderer/components/text/ParagraphComponentDescriptor.h>
#include <react/renderer/components/text/RawTextComponentDescriptor.h>
#include <react/renderer/components/text/SelectableParagraphComponentDescriptor.h>
#include <react/renderer/components/text/TextComponentDescriptor.h>
#include <react/renderer/components/view/ViewComponentDescriptor.h>

Expand All @@ -29,6 +30,7 @@ inline ComponentRegistryFactory getDefaultComponentRegistryFactory()
providerRegistry->add(concreteComponentDescriptorProvider<ParagraphComponentDescriptor>());
providerRegistry->add(concreteComponentDescriptorProvider<ScrollViewComponentDescriptor>());
providerRegistry->add(concreteComponentDescriptorProvider<RawTextComponentDescriptor>());
providerRegistry->add(concreteComponentDescriptorProvider<SelectableParagraphComponentDescriptor>());
providerRegistry->add(concreteComponentDescriptorProvider<TextComponentDescriptor>());
providerRegistry->add(concreteComponentDescriptorProvider<ViewComponentDescriptor>());
providerRegistry->add(concreteComponentDescriptorProvider<ModalHostViewComponentDescriptor>());
Expand Down
Loading