react-native-wheel-pick 1.2.5 → 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
|
@@ -122,6 +122,8 @@ onDateChange={(date: Date) => { console.log(date) }}
|
|
|
122
122
|
isShowSelectLine={false} // Default is true
|
|
123
123
|
selectLineColor='black'
|
|
124
124
|
selectLineSize={6} // Default is 4
|
|
125
|
+
|
|
126
|
+
isCyclic={true} // Support Infinitely Scrolling.
|
|
125
127
|
/>
|
|
126
128
|
|
|
127
129
|
// Android Only.
|
|
@@ -153,6 +155,14 @@ OR you can fork this project instead.
|
|
|
153
155
|
|
|
154
156
|
## Release Note
|
|
155
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
|
+
|
|
162
|
+
### 1.2.6 (Jul 5 2025)
|
|
163
|
+
[Android]
|
|
164
|
+
- Add support for `isCyclic` property on Android. (Infinitely Scrolling) Thanks to [@cip123](https://github.com/TronNatthakorn/react-native-wheel-pick/pull/67)
|
|
165
|
+
|
|
156
166
|
### 1.2.5 (Jun 14 2025)
|
|
157
167
|
[Android]
|
|
158
168
|
- Fix Android DatePicker time mode default selection issue and correct hour range. Thanks to [@harryxu](https://github.com/TronNatthakorn/react-native-wheel-pick/pull/66)
|
|
@@ -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"));
|
|
@@ -190,6 +192,14 @@ public class ReactWheelCurvedPickerManager extends SimpleViewManager<ReactWheelC
|
|
|
190
192
|
}
|
|
191
193
|
}
|
|
192
194
|
|
|
195
|
+
// @ReactProp(name="isCyclic")
|
|
196
|
+
@ReactProp(name="isCyclic")
|
|
197
|
+
public void setCyclic(ReactWheelCurvedPicker picker, boolean isCyclic) {
|
|
198
|
+
if (picker != null) {
|
|
199
|
+
picker.setCyclic(isCyclic);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
193
203
|
@Override
|
|
194
204
|
public String getName() {
|
|
195
205
|
return REACT_CLASS;
|