()
| 218 | } |
| 219 | |
| 220 | render() { |
| 221 | const { titleProperty, options, style, visible } = this.props; |
| 222 | const { listStyle } = this.state; |
| 223 | |
| 224 | if (_.size(options) === 0) { |
| 225 | return null; |
| 226 | } |
| 227 | const data = options.filter(option => option[titleProperty]); |
| 228 | |
| 229 | return ( |
| 230 | <Modal |
| 231 | visible={visible} |
| 232 | onRequestClose={this.close} |
| 233 | animationType="fade" |
| 234 | transparent |
| 235 | > |
| 236 | <View style={style.modal}> |
| 237 | <ListView |
| 238 | data={data} |
| 239 | renderRow={this.renderRow} |
| 240 | style={listStyle} |
| 241 | renderFooter={this.renderFooter} |
| 242 | /> |
| 243 | {this.renderGradient()} |
| 244 | <Button onPress={this.close} styleName="clear close"> |
| 245 | <Icon name="close" /> |
| 246 | </Button> |
| 247 | </View> |
| 248 | </Modal> |
| 249 | ); |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | DropDownModal.propTypes = { |
nothing calls this directly
no test coverage detected