mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Change type of SwipeRefreshLayoutManager.size prop from Int to String
Summary: This diff changes the type of the SwipeRefreshLayoutManager.size prop from Int to String in Fabric. The current implementation of this prop allows JS developers to use "int" type when fabric is enables and "int or string" types when using Fabric is disabled. Since long term we want to only support "string" type for this prop, I'm changing the type of the prop to be String. After my diff Fabric will start supporting only "string" types, non fabric screens will keep supporting "int or string" values. **Will this break production?** No, because there are no usages of RefreshControl.Size prop in fbsource **What about if someone start using this prop next week?** IMO It's very unlikely because of the nature of this prop, I will be monitoring next week and if there's an usage it will be detected by flow when trying to land D25933457. Changelog: [Android][Changed] - RefreshControl.size prop changed its type to string, the valid values are: 'default' and 'large' Reviewed By: JoshuaGross Differential Revision: D25933458 fbshipit-source-id: 55067d7405b063f1e8d9bb7a5fd7731f5f168960
This commit is contained in:
committed by
Facebook GitHub Bot
parent
69b3016171
commit
65975dd28d
@@ -42,16 +42,8 @@ type NativeProps = $ReadOnly<{|
|
||||
progressBackgroundColor?: ?ColorValue,
|
||||
/**
|
||||
* Size of the refresh indicator, see RefreshControl.SIZE.
|
||||
*
|
||||
* This type isn't currently accurate. It really is specific numbers
|
||||
* hard coded in the Android platform.
|
||||
*
|
||||
* Also, 1 isn't actually a safe default. We are able to set this here
|
||||
* because native code isn't currently consuming the generated artifact.
|
||||
* This will end up being
|
||||
* size?: WithDefault<'default' | 'large', 'default'>,
|
||||
*/
|
||||
size?: WithDefault<Int32, 1>,
|
||||
size?: WithDefault<'default' | 'large', 'default'>,
|
||||
/**
|
||||
* Progress view top offset
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user