mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-13 22:29:45 +08:00
Add support for double type in ReactPropGroup
Reviewed By: astreet Differential Revision: D2735362 fb-gh-sync-id: a8eab400248fc4c8ad5d43e6a34cfd350dfb1d26
This commit is contained in:
committed by
facebook-github-bot-4
parent
e8659b3602
commit
c0c8e7cfdf
@@ -26,7 +26,8 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
* group of the property being updated. Last, third argument represent the value that should be set.
|
||||
*
|
||||
*
|
||||
* Currently only {@code int}, {@code float} and {@link String} value types are supported.
|
||||
* Currently only {@code int}, {@code float}, {@code double} and {@link String} value types are
|
||||
* supported.
|
||||
*
|
||||
* In case when property has been removed from the corresponding react component annotated setter
|
||||
* will be called and default value will be provided as a value parameter. Default value can be
|
||||
@@ -68,6 +69,13 @@ public @interface ReactPropGroup {
|
||||
*/
|
||||
float defaultFloat() default 0.0f;
|
||||
|
||||
/**
|
||||
* Default value for property of type {@code double}. This value will be provided to property
|
||||
* setter method annotated with {@link ReactPropGroup} if property with a given name gets removed
|
||||
* from the component description in JS
|
||||
*/
|
||||
double defaultDouble() default 0.0;
|
||||
|
||||
/**
|
||||
* Default value for property of type {@code int}. This value will be provided to property
|
||||
* setter method annotated with {@link ReactPropGroup} if property with a given name gets removed
|
||||
|
||||
Reference in New Issue
Block a user