Open KarthikBaleneni opened 6 years ago
Hi,
I'm wondering if there is a possibility to display both image and text in row by allowing arrays with key value pair index for the following dropdown.
<ModalDropdown enableEmptySections={true} dropdownStyle={styles.dropdown_2_dropdown} renderRow={this.displayRow.bind(this)} textStyle={styles.dropdown_2_text} style={styles.dropdown} defaultValue={i18n.t('selcode')} onSelect={(idx, value) => this._selectedCountry(idx, value)} options={this.state.stCountryList} />
Array like this
options=[{img:'../.png,value:'opotion1},{img:'../.png,value:'option2}]
so that
RenderRow function render will be like
displayRow = (data) => { return ( <TouchableHighlight> <Img source='require( {`${data.img}`})/> <Text style={styles.dropdown_label}>{`${data.value}`}</Text> </TouchableHighlight> ) }
Hi,
I'm wondering if there is a possibility to display both image and text in row by allowing arrays with key value pair index for the following dropdown.
Array like this
options=[{img:'../.png,value:'opotion1},{img:'../.png,value:'option2}]
so that
RenderRow function render will be like