Fix cloning for ReactTextInputShadowNode
Reviewed By: shergin Differential Revision: D7628252 fbshipit-source-id: 034f2d619f716600dde21a5dd43538c261be773b
This commit is contained in:
parent
311a7a8e82
commit
660a578aeb
|
@ -15,6 +15,7 @@ import com.facebook.infer.annotation.Assertions;
|
|||
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
|
||||
import com.facebook.react.common.annotations.VisibleForTesting;
|
||||
import com.facebook.react.uimanager.LayoutShadowNode;
|
||||
import com.facebook.react.uimanager.ReactShadowNodeImpl;
|
||||
import com.facebook.react.uimanager.Spacing;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
import com.facebook.react.uimanager.UIViewOperationQueue;
|
||||
|
@ -53,11 +54,6 @@ public class ReactTextInputShadowNode extends ReactBaseTextShadowNode
|
|||
mMostRecentEventCount = node.mMostRecentEventCount;
|
||||
mText = node.mText;
|
||||
mLocalData = node.mLocalData;
|
||||
setMeasureFunction(this);
|
||||
ThemedReactContext themedContext = getThemedContext();
|
||||
if (themedContext != null) {
|
||||
setThemedContext(themedContext);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -65,6 +61,28 @@ public class ReactTextInputShadowNode extends ReactBaseTextShadowNode
|
|||
return new ReactTextInputShadowNode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReactTextInputShadowNode mutableCopy() {
|
||||
ReactTextInputShadowNode node = (ReactTextInputShadowNode) super.mutableCopy();
|
||||
node.setMeasureFunction(this);
|
||||
ThemedReactContext themedContext = getThemedContext();
|
||||
if (themedContext != null) {
|
||||
node.setThemedContext(themedContext);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReactTextInputShadowNode mutableCopyWithNewChildren() {
|
||||
ReactTextInputShadowNode node = (ReactTextInputShadowNode) super.mutableCopyWithNewChildren();
|
||||
node.setMeasureFunction(this);
|
||||
ThemedReactContext themedContext = getThemedContext();
|
||||
if (themedContext != null) {
|
||||
node.setThemedContext(themedContext);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setThemedContext(ThemedReactContext themedContext) {
|
||||
super.setThemedContext(themedContext);
|
||||
|
|
Loading…
Reference in New Issue