react-native-controlled-input 0.13.0 → 0.14.0
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.
|
@@ -26,10 +26,6 @@ import com.facebook.react.uimanager.UIManagerHelper
|
|
|
26
26
|
import kotlinx.coroutines.flow.MutableStateFlow
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
* Keep this class in package `com.controlledinput` with simple name `ControlledInputView`:
|
|
30
|
-
* apps that patch `react-native-keyboard-controller` locate the host via
|
|
31
|
-
* `Class.name == "com.controlledinput.ControlledInputView"` for Compose (non-EditText) focus.
|
|
32
|
-
*
|
|
33
29
|
* RN + Jetpack Compose hosting view aligned with Expo UI / [ExpoComposeView] + [ExpoView]:
|
|
34
30
|
* - [shouldUseAndroidLayout]: requestLayout posts measureAndLayout (RN #17968)
|
|
35
31
|
* - onMeasure skips child [ComposeView] until attached (window + WindowRecomposer)
|
|
@@ -28,15 +28,6 @@ using namespace facebook::react;
|
|
|
28
28
|
return concreteComponentDescriptorProvider<ControlledInputViewComponentDescriptor>();
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
/// `react-native-keyboard-controller` resolves `UIResponder.reactViewTag` as
|
|
32
|
-
/// `(firstResponder as UIView).superview.tag`. The field's superview is this content view,
|
|
33
|
-
/// so its `tag` must match the Fabric component's react tag or keyboard events disagree
|
|
34
|
-
/// on `target` and `KeyboardAwareScrollView` mis-animates (iOS hide jumps).
|
|
35
|
-
- (void)syncContentViewReactTagFromContainer
|
|
36
|
-
{
|
|
37
|
-
_inputView.tag = self.tag;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
31
|
- (instancetype)initWithFrame:(CGRect)frame
|
|
41
32
|
{
|
|
42
33
|
if (self = [super initWithFrame:frame]) {
|
|
@@ -47,18 +38,11 @@ using namespace facebook::react;
|
|
|
47
38
|
_inputView.delegate = self;
|
|
48
39
|
|
|
49
40
|
self.contentView = _inputView;
|
|
50
|
-
[self syncContentViewReactTagFromContainer];
|
|
51
41
|
}
|
|
52
42
|
|
|
53
43
|
return self;
|
|
54
44
|
}
|
|
55
45
|
|
|
56
|
-
- (void)layoutSubviews
|
|
57
|
-
{
|
|
58
|
-
[super layoutSubviews];
|
|
59
|
-
[self syncContentViewReactTagFromContainer];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
46
|
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
|
63
47
|
{
|
|
64
48
|
const auto &oldViewProps = *std::static_pointer_cast<ControlledInputViewProps const>(_props);
|
package/package.json
CHANGED