haya-select 1.0.59 → 1.0.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haya-select",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -427,8 +427,8 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
427
427
  icon={this.iconForOption(loadedOption)}
428
428
  key={key}
429
429
  option={loadedOption}
430
- onOptionClicked={this.onOptionClicked}
431
- presentOption={this.presentOption}
430
+ onOptionClicked={this.tt.onOptionClicked}
431
+ presentOption={this.tt.presentOption}
432
432
  />
433
433
  )
434
434
  }
@@ -765,6 +765,7 @@ export default memo(shapeComponent(class HayaSelect extends ShapeComponent {
765
765
  <View
766
766
  dataSet={{
767
767
  class: "option-presentation",
768
+ text: option.text,
768
769
  toggleIcon: toggleOption?.icon,
769
770
  toggleValue: toggleOption?.value,
770
771
  value: option.value
@@ -4,9 +4,13 @@ import {shapeComponent, ShapeComponent} from "set-state-compare/src/shape-compon
4
4
  import {View} from "react-native"
5
5
 
6
6
  export default memo(shapeComponent(class Option extends ShapeComponent {
7
+ static defaultProps = {
8
+ disabled: false
9
+ }
10
+
7
11
  static propTypes = {
8
12
  currentOptionValues: PropTypes.array.isRequired,
9
- disabled: PropTypes.bool,
13
+ disabled: PropTypes.bool.isRequired,
10
14
  icon: PropTypes.string,
11
15
  onOptionClicked: PropTypes.func.isRequired,
12
16
  option: PropTypes.object.isRequired,
@@ -59,12 +63,12 @@ export default memo(shapeComponent(class Option extends ShapeComponent {
59
63
  onPointerOut={this.tt.onPointerOut}
60
64
  style={style}
61
65
  >
62
- {this.props.presentOption(option, "option")}
66
+ {this.p.presentOption(option, "option")}
63
67
  </View>
64
68
  )
65
69
  }
66
70
 
67
- onClick = (e) => this.props.onOptionClicked(e, this.props.option)
71
+ onClick = (e) => this.p.onOptionClicked(e, this.props.option)
68
72
  onPointerOver = () => this.setState({hover: true})
69
73
  onPointerOut = () => this.setState({hover: false})
70
74
  }))