@react-native-hero/picker 0.1.2 → 0.1.4

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.
@@ -25,7 +25,7 @@ class PickerView(private val reactContext: ThemedReactContext) : WheelView(react
25
25
  val stringList = arrayListOf<String>()
26
26
 
27
27
  for (i in 0 until value.size()) {
28
- val map = value.getMap(i)
28
+ val map = value.getMap(i)!!
29
29
  var text = "undefined"
30
30
  if (map.hasKey("text")) {
31
31
  text = map.getString("text") as String
@@ -45,6 +45,14 @@ class PickerView(private val reactContext: ThemedReactContext) : WheelView(react
45
45
  override fun getItem(index: Int): String {
46
46
  return stringList[index]
47
47
  }
48
+
49
+ override fun getMaxValue(): Int {
50
+ return 0
51
+ }
52
+
53
+ override fun getMinValue(): Int {
54
+ return 0
55
+ }
48
56
  }
49
57
 
50
58
  if (tempIndex >= 0) {
@@ -78,7 +86,7 @@ class PickerView(private val reactContext: ThemedReactContext) : WheelView(react
78
86
  // putMap 必须传入 WritableMap
79
87
  // 如果直接传 ReadableMap 会报错
80
88
  val option = Arguments.createMap()
81
- option.merge(options.getMap(value))
89
+ option.merge(options.getMap(value)!!)
82
90
 
83
91
  map.putMap("option", option)
84
92
  sendEvent("onChange", map)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-hero/picker",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "react native picker",
5
5
  "main": "index.js",
6
6
  "scripts": {