mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix accessibilityState serialization for props diffing of View component (#51420)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51420 The checked and unchecked state of the accessibility state property has to be serialized as `{ "checked": true }` and `{"checked": false}`. This diff updates the serialization of the `accessibilityState` prop for the prop diffing on the View component. This fixes the e2e test selectors for radio buttons. Changelog: [Internal] Reviewed By: rshest Differential Revision: D74910744 fbshipit-source-id: 212b78e29a007744ac9283c7ec9b96ce80fd5681
This commit is contained in:
committed by
Facebook GitHub Bot
parent
01db5aa230
commit
f278c94a12
+2
-2
@@ -475,10 +475,10 @@ inline static void updateAccessibilityStateProp(
|
||||
if (!oldState.has_value() || newState->checked != oldState->checked) {
|
||||
switch (newState->checked) {
|
||||
case AccessibilityState::Unchecked:
|
||||
resultState["checked"] = "unchecked";
|
||||
resultState["checked"] = false;
|
||||
break;
|
||||
case AccessibilityState::Checked:
|
||||
resultState["checked"] = "checked";
|
||||
resultState["checked"] = true;
|
||||
break;
|
||||
case AccessibilityState::Mixed:
|
||||
resultState["checked"] = "mixed";
|
||||
|
||||
Reference in New Issue
Block a user