Skip to content

Commit

Permalink
Share TextInputEventEmitter between C++ platforms (#46198)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #46198

Extending on #43431 this change allows to share the TextInputEventEmitter with our C++ based platforms such as RN Windows > https://github.com/microsoft/react-native-windows/blob/main/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputEventEmitter.h

## Changelog:
[Internal] - Share TextInputEventEmitter between C++ platforms

Differential Revision: D61749959
  • Loading branch information
christophpurrer authored and facebook-github-bot committed Aug 24, 2024
1 parent 6cfe51d commit 5f01c10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Pod::Spec.new do |s|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "react/renderer/components/textinput/platform/ios/**/*.{m,mm,cpp,h}"
sss.source_files = "react/renderer/components/textinput/*.{cpp,h}"
sss.header_dir = "react/renderer/components/iostextinput"

end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ static jsi::Value textInputMetricsPayload(
"text",
jsi::String::createFromUtf8(runtime, textInputMetrics.text));

payload.setProperty(runtime, "target", textInputMetrics.target);

payload.setProperty(runtime, "eventCount", textInputMetrics.eventCount);

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class TextInputEventEmitter : public ViewEventEmitter {
int eventCount;
Size layoutMeasurement;
Float zoomScale;
Tag target;
};

struct KeyPressMetrics {
Expand Down

0 comments on commit 5f01c10

Please sign in to comment.