@@ -95,6 +95,51 @@ HostPlatformViewProps::HostPlatformViewProps(
95
95
rawProps,
96
96
" screenReaderFocusable" ,
97
97
sourceProps.screenReaderFocusable,
98
+ {})),
99
+ nextFocusDown(
100
+ ReactNativeFeatureFlags::enableCppPropsIteratorSetter ()
101
+ ? sourceProps.nextFocusDown
102
+ : convertRawProp(
103
+ context,
104
+ rawProps,
105
+ " nextFocusDown" ,
106
+ sourceProps.nextFocusDown,
107
+ {})),
108
+ nextFocusForward(
109
+ ReactNativeFeatureFlags::enableCppPropsIteratorSetter ()
110
+ ? sourceProps.nextFocusForward
111
+ : convertRawProp(
112
+ context,
113
+ rawProps,
114
+ " nextFocusForward" ,
115
+ sourceProps.nextFocusForward,
116
+ {})),
117
+ nextFocusLeft(
118
+ ReactNativeFeatureFlags::enableCppPropsIteratorSetter ()
119
+ ? sourceProps.nextFocusLeft
120
+ : convertRawProp(
121
+ context,
122
+ rawProps,
123
+ " nextFocusLeft" ,
124
+ sourceProps.nextFocusLeft,
125
+ {})),
126
+ nextFocusRight(
127
+ ReactNativeFeatureFlags::enableCppPropsIteratorSetter ()
128
+ ? sourceProps.nextFocusRight
129
+ : convertRawProp(
130
+ context,
131
+ rawProps,
132
+ " nextFocusRight" ,
133
+ sourceProps.nextFocusRight,
134
+ {})),
135
+ nextFocusUp(
136
+ ReactNativeFeatureFlags::enableCppPropsIteratorSetter ()
137
+ ? sourceProps.nextFocusUp
138
+ : convertRawProp(
139
+ context,
140
+ rawProps,
141
+ " nextFocusUp" ,
142
+ sourceProps.nextFocusUp,
98
143
{})) {}
99
144
100
145
#define VIEW_EVENT_CASE (eventType ) \
@@ -130,6 +175,11 @@ void HostPlatformViewProps::setProp(
130
175
RAW_SET_PROP_SWITCH_CASE_BASIC (needsOffscreenAlphaCompositing);
131
176
RAW_SET_PROP_SWITCH_CASE_BASIC (renderToHardwareTextureAndroid);
132
177
RAW_SET_PROP_SWITCH_CASE_BASIC (screenReaderFocusable);
178
+ RAW_SET_PROP_SWITCH_CASE_BASIC (nextFocusDown);
179
+ RAW_SET_PROP_SWITCH_CASE_BASIC (nextFocusForward);
180
+ RAW_SET_PROP_SWITCH_CASE_BASIC (nextFocusLeft);
181
+ RAW_SET_PROP_SWITCH_CASE_BASIC (nextFocusRight);
182
+ RAW_SET_PROP_SWITCH_CASE_BASIC (nextFocusUp);
133
183
}
134
184
}
135
185
@@ -982,6 +1032,46 @@ folly::dynamic HostPlatformViewProps::getDiffProps(
982
1032
result[" importantForAccessibility" ] = toString (importantForAccessibility);
983
1033
}
984
1034
1035
+ if (nextFocusDown != oldProps->nextFocusDown ) {
1036
+ if (nextFocusDown.has_value ()) {
1037
+ result[" nextFocusDown" ] = nextFocusDown.value ();
1038
+ } else {
1039
+ result[" nextFocusDown" ] = folly::dynamic (nullptr );
1040
+ }
1041
+ }
1042
+
1043
+ if (nextFocusForward != oldProps->nextFocusForward ) {
1044
+ if (nextFocusForward.has_value ()) {
1045
+ result[" nextFocusForward" ] = nextFocusForward.value ();
1046
+ } else {
1047
+ result[" nextFocusForward" ] = folly::dynamic (nullptr );
1048
+ }
1049
+ }
1050
+
1051
+ if (nextFocusLeft != oldProps->nextFocusLeft ) {
1052
+ if (nextFocusLeft.has_value ()) {
1053
+ result[" nextFocusLeft" ] = nextFocusLeft.value ();
1054
+ } else {
1055
+ result[" nextFocusLeft" ] = folly::dynamic (nullptr );
1056
+ }
1057
+ }
1058
+
1059
+ if (nextFocusRight != oldProps->nextFocusRight ) {
1060
+ if (nextFocusRight.has_value ()) {
1061
+ result[" nextFocusRight" ] = nextFocusRight.value ();
1062
+ } else {
1063
+ result[" nextFocusRight" ] = folly::dynamic (nullptr );
1064
+ }
1065
+ }
1066
+
1067
+ if (nextFocusUp != oldProps->nextFocusUp ) {
1068
+ if (nextFocusUp.has_value ()) {
1069
+ result[" nextFocusUp" ] = nextFocusUp.value ();
1070
+ } else {
1071
+ result[" nextFocusUp" ] = folly::dynamic (nullptr );
1072
+ }
1073
+ }
1074
+
985
1075
return result;
986
1076
}
987
1077
0 commit comments