mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add function properties to C++ TM complex datatyes (#41810)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41810 Changelog: [Internal] Reviewed By: zeyap Differential Revision: D51858746 fbshipit-source-id: e45ee68fc40e8b7ae3388ecdcedfec646d022e19
This commit is contained in:
committed by
Facebook GitHub Bot
parent
616a907798
commit
db609ff0c6
@@ -169,6 +169,15 @@ void NativeCxxModuleExample::voidFunc(jsi::Runtime& rt) {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
void NativeCxxModuleExample::setMenu(jsi::Runtime& rt, MenuItem menuItem) {
|
||||
menuItem.onPress("value", true);
|
||||
if (menuItem.items) {
|
||||
for (auto subMenuItem : *menuItem.items) {
|
||||
subMenuItem.onPress("another value", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NativeCxxModuleExample::emitCustomDeviceEvent(
|
||||
jsi::Runtime& rt,
|
||||
jsi::String eventName) {
|
||||
|
||||
Reference in New Issue
Block a user