mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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: https://github.com/reactwg/react-native-new-architecture/discussions/110 ## Changelog: [GENERAL] [CHANGED] - move view flattening props to cross platform type interface Pull Request resolved: https://github.com/facebook/react-native/pull/49220 Test Plan: N/A Reviewed By: fabriziocucci Differential Revision: D69239454 Pulled By: javache fbshipit-source-id: a89cb9fbaec63bbcb7691df067d5d3a375a8a66e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
eae7d3c6a1
commit
ecad90ad8b
@@ -76,20 +76,6 @@ export interface ViewPropsIOS extends TVViewPropsIOS {
|
||||
}
|
||||
|
||||
export interface ViewPropsAndroid {
|
||||
/**
|
||||
* Views that are only used to layout their children or otherwise don't draw anything
|
||||
* may be automatically removed from the native hierarchy as an optimization.
|
||||
* Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.
|
||||
*/
|
||||
collapsable?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Setting to false prevents direct children of the view from being removed
|
||||
* from the native view hierarchy, similar to the effect of setting
|
||||
* `collapsable={false}` on each child.
|
||||
*/
|
||||
collapsableChildren?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Whether this view should render itself (and all of its children) into a single hardware texture on the GPU.
|
||||
*
|
||||
@@ -211,4 +197,18 @@ export interface ViewProps
|
||||
* Used to reference react managed views from native code.
|
||||
*/
|
||||
nativeID?: string | undefined;
|
||||
|
||||
/**
|
||||
* Views that are only used to layout their children or otherwise don't draw anything
|
||||
* may be automatically removed from the native hierarchy as an optimization.
|
||||
* Set this property to false to disable this optimization and ensure that this View exists in the native view hierarchy.
|
||||
*/
|
||||
collapsable?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Setting to false prevents direct children of the view from being removed
|
||||
* from the native view hierarchy, similar to the effect of setting
|
||||
* `collapsable={false}` on each child.
|
||||
*/
|
||||
collapsableChildren?: boolean | undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user