Skip to content

Commit ecad90a

Browse files
okwasniewskifacebook-github-bot
authored andcommittedFeb 6, 2025·
fix: move view flattening props to cross platform type interface (#49220)
Summary: Hey! Since new architecture introduced View Flattening on iOS, props responsible for disabling this feature on specific views should be defined in cross platform interface. Reference: reactwg/react-native-new-architecture#110 ## Changelog: [GENERAL] [CHANGED] - move view flattening props to cross platform type interface Pull Request resolved: #49220 Test Plan: N/A Reviewed By: fabriziocucci Differential Revision: D69239454 Pulled By: javache fbshipit-source-id: a89cb9fbaec63bbcb7691df067d5d3a375a8a66e
1 parent eae7d3c commit ecad90a

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed
 

‎packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,6 @@ export interface ViewPropsIOS extends TVViewPropsIOS {
7676
}
7777

7878
export interface ViewPropsAndroid {
79-
/**
80-
* Views that are only used to layout their children or otherwise don't draw anything
81-
* may be automatically removed from the native hierarchy as an optimization.
82-
* Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.
83-
*/
84-
collapsable?: boolean | undefined;
85-
86-
/**
87-
* Setting to false prevents direct children of the view from being removed
88-
* from the native view hierarchy, similar to the effect of setting
89-
* `collapsable={false}` on each child.
90-
*/
91-
collapsableChildren?: boolean | undefined;
92-
9379
/**
9480
* Whether this view should render itself (and all of its children) into a single hardware texture on the GPU.
9581
*
@@ -211,4 +197,18 @@ export interface ViewProps
211197
* Used to reference react managed views from native code.
212198
*/
213199
nativeID?: string | undefined;
200+
201+
/**
202+
* Views that are only used to layout their children or otherwise don't draw anything
203+
* may be automatically removed from the native hierarchy as an optimization.
204+
* Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.
205+
*/
206+
collapsable?: boolean | undefined;
207+
208+
/**
209+
* Setting to false prevents direct children of the view from being removed
210+
* from the native view hierarchy, similar to the effect of setting
211+
* `collapsable={false}` on each child.
212+
*/
213+
collapsableChildren?: boolean | undefined;
214214
}

0 commit comments

Comments
 (0)
Please sign in to comment.