react-native-wheel-pick 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -155,6 +155,10 @@ OR you can fork this project instead.
|
|
|
155
155
|
|
|
156
156
|
## Release Note
|
|
157
157
|
|
|
158
|
+
### 1.2.7 (Feb 1 2026)
|
|
159
|
+
[Android]
|
|
160
|
+
- Add support for decimal number on Native Android. Thanks to [@ArnaudDerosin](https://github.com/TronNatthakorn/react-native-wheel-pick/pull/69)
|
|
161
|
+
|
|
158
162
|
### 1.2.6 (Jul 5 2025)
|
|
159
163
|
[Android]
|
|
160
164
|
- Add support for `isCyclic` property on Android. (Infinitely Scrolling) Thanks to [@cip123](https://github.com/TronNatthakorn/react-native-wheel-pick/pull/67)
|
|
@@ -41,7 +41,7 @@ public class ReactWheelCurvedPicker extends WheelPicker {
|
|
|
41
41
|
public ReactWheelCurvedPicker(ReactContext reactContext) {
|
|
42
42
|
super(reactContext);
|
|
43
43
|
|
|
44
|
-
if(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
44
|
+
if(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
45
45
|
mEventDispatcher = (UIManagerHelper.getUIManager(reactContext, 1 /** UIManagerType */)).getEventDispatcher();
|
|
46
46
|
} else {
|
|
47
47
|
mEventDispatcher = reactContext.getNativeModule(UIManagerModule.class).getEventDispatcher();
|
|
@@ -110,6 +110,8 @@ class ItemSelectedEvent extends Event<ItemSelectedEvent> {
|
|
|
110
110
|
Class mValueClass = mValue.getClass();
|
|
111
111
|
if (mValueClass == Integer.class) {
|
|
112
112
|
eventData.putInt("data", (Integer) mValue);
|
|
113
|
+
} else if (mValueClass == Double.class) {
|
|
114
|
+
eventData.putDouble("data", (Double) mValue);
|
|
113
115
|
} else if (mValueClass == String.class) {
|
|
114
116
|
eventData.putString("data", mValue.toString());
|
|
115
117
|
}
|
|
@@ -71,6 +71,8 @@ public class ReactWheelCurvedPickerManager extends SimpleViewManager<ReactWheelC
|
|
|
71
71
|
valueData.add(itemMap.getString("value"));
|
|
72
72
|
} else if (itemMap.getType("value") == ReadableType.Number) {
|
|
73
73
|
valueData.add(itemMap.getInt("value"));
|
|
74
|
+
// Store as Double to preserve decimal precision
|
|
75
|
+
valueData.add(itemMap.getDouble("value"));
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
labelData.add(itemMap.getString("label"));
|