Skip to content

Commit

Permalink
Adjust no-hide-descendants Code to Support Touchable (#10756)
Browse files Browse the repository at this point in the history
* Save State

* Change files

* Fix Lint
  • Loading branch information
chiaramooney committed Oct 20, 2022
1 parent 6703c83 commit 53e54d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Save State",
"packageName": "react-native-windows",
"email": "34109996+chiaramooney@users.noreply.github.com",
"dependentChangeType": "patch"
}
7 changes: 6 additions & 1 deletion vnext/src/Libraries/Components/View/View.windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const View: React.AbstractComponent<

// [Windows
const childrenWithImportantForAccessibility = children => {
return React.Children.map(children, child => {
const updatedChildren = React.Children.map(children, child => {
if (React.isValidElement(child)) {
if (child.props.children) {
return React.cloneElement(child, {
Expand All @@ -92,6 +92,11 @@ const View: React.AbstractComponent<
}
return child;
});
if (updatedChildren.length == 1) {
return updatedChildren[0];
} else {
return updatedChildren;
}
};
// Windows]

Expand Down

0 comments on commit 53e54d0

Please sign in to comment.