@expensify/react-native-live-markdown 0.1.291 → 0.1.292

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,6 +20,18 @@ void MarkdownTextInputDecoratorShadowNode::initialize() {
20
20
  // removing the trait, it's possible to force RN to create a host view, layout
21
21
  // of which can then be customized.
22
22
  ShadowNode::traits_.unset(ShadowNodeTraits::ForceFlattenView);
23
+
24
+ // When the decorator is cloned and has a child node, the child node should be
25
+ // cloned as well to ensure it is mutable.
26
+ const auto &children = getChildren();
27
+ if (!children.empty()) {
28
+ react_native_assert(
29
+ children.size() == 1 &&
30
+ "MarkdownTextInputDecoratorView received more than one child");
31
+
32
+ const auto clonedChild = children[0]->clone({});
33
+ replaceChild(*children[0], clonedChild);
34
+ }
23
35
  }
24
36
 
25
37
  void MarkdownTextInputDecoratorShadowNode::createCustomContextContainer() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expensify/react-native-live-markdown",
3
- "version": "0.1.291",
3
+ "version": "0.1.292",
4
4
  "description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",