(props)
| 123 | } |
| 124 | |
| 125 | constructor(props) { |
| 126 | super(props); |
| 127 | |
| 128 | const items = RNPickerSelect.handlePlaceholder({ |
| 129 | placeholder: props.placeholder, |
| 130 | }).concat(props.items); |
| 131 | |
| 132 | const { selectedItem } = RNPickerSelect.getSelectedItem({ |
| 133 | items, |
| 134 | key: props.itemKey, |
| 135 | value: props.value, |
| 136 | }); |
| 137 | |
| 138 | this.state = { |
| 139 | items, |
| 140 | selectedItem, |
| 141 | showPicker: false, |
| 142 | animationType: undefined, |
| 143 | orientation: 'portrait', |
| 144 | doneDepressed: false, |
| 145 | }; |
| 146 | |
| 147 | this.onUpArrow = this.onUpArrow.bind(this); |
| 148 | this.onDownArrow = this.onDownArrow.bind(this); |
| 149 | this.onValueChange = this.onValueChange.bind(this); |
| 150 | this.onOrientationChange = this.onOrientationChange.bind(this); |
| 151 | this.setInputRef = this.setInputRef.bind(this); |
| 152 | this.togglePicker = this.togglePicker.bind(this); |
| 153 | this.renderInputAccessoryView = this.renderInputAccessoryView.bind(this); |
| 154 | } |
| 155 | |
| 156 | componentDidUpdate = (prevProps, prevState) => { |
| 157 | // update items if items or placeholder prop changes |
nothing calls this directly
no outgoing calls
no test coverage detected