MCPcopy Create free account
hub / github.com/shoutem/ui / renderSelectedOption

Method renderSelectedOption

components/DropDownMenu/DropDownMenu.js:49–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 }
48
49 renderSelectedOption() {
50 const { iconName, showSelectedOption, style, titleProperty } = this.props;
51
52 const selectedOption = this.getSelectedOption();
53 return selectedOption ? (
54 <View style={style.horizontalContainer}>
55 <Button onPress={this.collapse} style={style.selectedOption}>
56 {showSelectedOption && <Text>{selectedOption[titleProperty]}</Text>}
57 <Icon name={iconName} style={style.icon} />
58 </Button>
59 </View>
60 ) : null;
61 }
62
63 render() {
64 const { collapsed } = this.state;

Callers 1

renderMethod · 0.95

Calls 1

getSelectedOptionMethod · 0.95

Tested by

no test coverage detected